[hackers] [quark] if there is no matching vhost return 404 Not Found || Hiltjo Posthuma

From: <git_AT_suckless.org>
Date: Sat, 22 Jul 2017 13:27:06 +0200 (CEST)

commit 4f2cc504160a79ea948552680161c24b05e8483f
Author: Hiltjo Posthuma <hiltjo_AT_codemadness.org>
AuthorDate: Sat Jul 22 12:30:23 2017 +0200
Commit: Laslo Hunhold <dev_AT_frign.de>
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
_AT_@ -577,6 +577,9 @@ sendresponse(int fd, struct request *r)
                                 break;
                         }
                 }
+ if (i == LEN(vhost)) {
+ return sendstatus(fd, S_NOT_FOUND);
+ }
         }
 
         /* normalize target */
Received on Sat Jul 22 2017 - 13:27:06 CEST

This archive was generated by hypermail 2.3.0 : Sat Jul 22 2017 - 13:37:12 CEST