commit 4f2cc504160a79ea948552680161c24b05e8483f
Author: Hiltjo Posthuma <[email protected]>
AuthorDate: Sat Jul 22 12:30:23 2017 +0200
Commit: Laslo Hunhold <[email protected]>
CommitDate: Sat Jul 22 13:23:10 2017 +0200
if there is no matching vhost return 404 Not Found
diff --git a/quark.c b/quark.c
index c4fa937..6d3fcb5 100644
--- 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 */