We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents da39d5e + 9247be0 commit 968792eCopy full SHA for 968792e
http-backend.c
@@ -594,9 +594,11 @@ int main(int argc, char **argv)
594
595
if (strcmp(method, c->method)) {
596
const char *proto = getenv("SERVER_PROTOCOL");
597
- if (proto && !strcmp(proto, "HTTP/1.1"))
+ if (proto && !strcmp(proto, "HTTP/1.1")) {
598
http_status(405, "Method Not Allowed");
599
- else
+ hdr_str("Allow", !strcmp(c->method, "GET") ?
600
+ "GET, HEAD" : c->method);
601
+ } else
602
http_status(400, "Bad Request");
603
hdr_nocache();
604
end_headers();
0 commit comments