commit ee10f83391cea10260c7632eca3f8d1beb918741
Author: Hiltjo Posthuma <[email protected]>
AuthorDate: Tue Jun 27 21:37:18 2017 +0200
Commit: Laslo Hunhold <[email protected]>
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
@@ -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 */