Prechádzať zdrojové kódy

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 rokov pred
rodič
commit
7b071cb28c
1 zmenil súbory, kde vykonal 1 pridanie a 1 odobranie
  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;
     }