瀏覽代碼

Handle PUT/DELETE to *.cgi as a request to replace/remove the script file

Restore behavior of previous release version
GET xy.cgi calls xy.cgi and returns the page generated by the script
POST xy.cgi calls xy.cgi and returns the page generated by the script
PUT xy.cgi replaces xy.cgi by the new content
DELETE cx.cgi removes xy.cgi
GET xy.cgi/* calls xy.cgi and returns the page generated by the script
POST xy.cgi/* calls xy.cgi and returns the page generated by the script
PUT xy.cgi/* calls xy.cgi and returns the page generated by the script
DELETE xy.cgi/* calls xy.cgi and returns the page generated by the script
See issue #65: CGI POST is no longer working
bel 10 年之前
父節點
當前提交
7b071cb28c
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      src/civetweb.c

+ 1 - 1
src/civetweb.c

@@ -2911,7 +2911,7 @@ static void interpret_uri(struct mg_connection *conn,    /* in: request */
                          (int)strlen(conn->ctx->config[LUA_SCRIPT_EXTENSIONS]), filename) > 0
 #endif
            ) {
-               *is_script_ressource = 1;
+               *is_script_ressource = !is_put_or_delete_request;
         }
         return;
     }