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

This commit is contained in:
Hiltjo Posthuma 2017-06-27 21:37:18 +02:00 committed by Laslo Hunhold
parent 102cf09cc5
commit ee10f83391

View file

@ -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 */