소스 검색

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;
     }