quark

quark web server
git clone git://git.suckless.org/quark
Log | Files | Refs | LICENSE

commit 4f2cc504160a79ea948552680161c24b05e8483f
parent c20aa17ae842149c0f6d5edaf64b67977b16cd3d
Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date:   Sat, 22 Jul 2017 12:30:23 +0200

if there is no matching vhost return 404 Not Found

Diffstat:
Mquark.c | 3+++
1 file changed, 3 insertions(+), 0 deletions(-)

diff --git a/quark.c b/quark.c @@ -577,6 +577,9 @@ sendresponse(int fd, struct request *r) break; } } + if (i == LEN(vhost)) { + return sendstatus(fd, S_NOT_FOUND); + } } /* normalize target */