[hackers] [quark] send status code for method not allowed if not GET or HEAD || Hiltjo Posthuma

From: <git_AT_suckless.org>
Date: Tue, 27 Jun 2017 23:31:28 +0200 (CEST)

commit ee10f83391cea10260c7632eca3f8d1beb918741
Author: Hiltjo Posthuma <hiltjo_AT_codemadness.org>
AuthorDate: Tue Jun 27 21:37:18 2017 +0200
Commit: Laslo Hunhold <dev_AT_frign.de>
CommitDate: Tue Jun 27 23:31:08 2017 +0200

    send status code for method not allowed if not GET or HEAD

diff --git a/quark.c b/quark.c
index a943f88..8d151a1 100644
--- a/quark.c
+++ b/quark.c
_AT_@ -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 */
Received on Tue Jun 27 2017 - 23:31:28 CEST

This archive was generated by hypermail 2.3.0 : Tue Jun 27 2017 - 23:36:32 CEST