mirror of
https://github.com/cesanta/mongoose.git
synced 2026-11-23 20:11:49 +00:00
Removed method checks for CGI
This commit is contained in:
1 parent
9115a99f47
commit
89ef8f2f30
1 file changed
+2
-8
+2
-8
@@ -3386,17 +3386,11 @@ static void open_local_endpoint(struct connection *conn) {
|
|||||||
send_http_error(conn, 501, NULL);
|
send_http_error(conn, 501, NULL);
|
||||||
#endif
|
#endif
|
||||||
} else if (match_prefix(cgi_pat, strlen(cgi_pat), path) > 0) {
|
} 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)
|
#if !defined(NO_CGI)
|
||||||
open_cgi_endpoint(conn, path);
|
open_cgi_endpoint(conn, path);
|
||||||
#else
|
#else
|
||||||
send_http_error(conn, 501, NULL);
|
send_http_error(conn, 501, NULL);
|
||||||
#endif // !NO_CGI
|
#endif // !NO_CGI
|
||||||
}
|
|
||||||
} else if (is_not_modified(conn, &st)) {
|
} else if (is_not_modified(conn, &st)) {
|
||||||
send_http_error(conn, 304, NULL);
|
send_http_error(conn, 304, NULL);
|
||||||
} else if ((conn->endpoint.fd = open(path, O_RDONLY | O_BINARY)) != -1) {
|
} else if ((conn->endpoint.fd = open(path, O_RDONLY | O_BINARY)) != -1) {
|
||||||
|
|||||||
Reference in new issue
Block a user