Make HTTP server return 405 if not POST or GET

This commit is contained in:
Andrew Bettison 2015-09-28 17:23:44 +09:30
parent d9af2ffda4
commit cee5241951

View File

@ -1190,7 +1190,7 @@ static int http_request_start_body(struct http_request *r)
else {
IDEBUGF(r->debug, "Unsupported HTTP %s request", r->verb);
r->parser = NULL;
return 501;
return 405; // Method Not Allowed
}
if (_run_out(r))
return 100;