From ee10f83391cea10260c7632eca3f8d1beb918741 Mon Sep 17 00:00:00 2001 From: Hiltjo Posthuma Date: Tue, 27 Jun 2017 21:37:18 +0200 Subject: [PATCH] send status code for method not allowed if not GET or HEAD --- quark.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/quark.c b/quark.c index a943f88..8d151a1 100644 --- a/quark.c +++ b/quark.c @@ -215,7 +215,7 @@ getrequest(int fd, struct request *r) } } if (i == NUM_REQ_METHODS) { - return sendstatus(fd, S_BAD_REQUEST); + return sendstatus(fd, S_METHOD_NOT_ALLOWED); } /* a single space must follow the method */