Commit 8d6634ff authored by Sergey Lyubka's avatar Sergey Lyubka

Allowing HEAD method for CGI requests

parent 6c9ed3ca
...@@ -4243,6 +4243,7 @@ static void handle_request(struct mg_connection *conn) { ...@@ -4243,6 +4243,7 @@ static void handle_request(struct mg_connection *conn) {
strlen(conn->ctx->config[CGI_EXTENSIONS]), strlen(conn->ctx->config[CGI_EXTENSIONS]),
path) > 0) { path) > 0) {
if (strcmp(ri->request_method, "POST") && if (strcmp(ri->request_method, "POST") &&
strcmp(ri->request_method, "HEAD") &&
strcmp(ri->request_method, "GET")) { strcmp(ri->request_method, "GET")) {
send_http_error(conn, 501, "Not Implemented", send_http_error(conn, 501, "Not Implemented",
"Method %s is not implemented", ri->request_method); "Method %s is not implemented", ri->request_method);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment