From 89ef8f2f308c83099e23db649127d81763b78849 Mon Sep 17 00:00:00 2001 From: Sergey Lyubka Date: Wed, 15 Jan 2014 11:46:05 +0000 Subject: [PATCH] Removed method checks for CGI --- mongoose.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/mongoose.c b/mongoose.c index 85d293f8..f9d3c8f8 100644 --- a/mongoose.c +++ b/mongoose.c @@ -3386,17 +3386,11 @@ static void open_local_endpoint(struct connection *conn) { send_http_error(conn, 501, NULL); #endif } else if (match_prefix(cgi_pat, strlen(cgi_pat), path) > 0) { - if (strcmp(conn->mg_conn.request_method, "POST") && - strcmp(conn->mg_conn.request_method, "HEAD") && - strcmp(conn->mg_conn.request_method, "GET")) { - send_http_error(conn, 501, NULL); - } else { #if !defined(NO_CGI) - open_cgi_endpoint(conn, path); + open_cgi_endpoint(conn, path); #else - send_http_error(conn, 501, NULL); + send_http_error(conn, 501, NULL); #endif // !NO_CGI - } } else if (is_not_modified(conn, &st)) { send_http_error(conn, 304, NULL); } else if ((conn->endpoint.fd = open(path, O_RDONLY | O_BINARY)) != -1) {