]> git.kaiwu.me - nginx.git/commitdiff
Autoindex: discard request body (ticket #1439).
authorMaxim Dounin <mdounin@mdounin.ru>
Mon, 4 Dec 2017 14:30:02 +0000 (17:30 +0300)
committerMaxim Dounin <mdounin@mdounin.ru>
Mon, 4 Dec 2017 14:30:02 +0000 (17:30 +0300)
src/http/modules/ngx_http_autoindex_module.c

index b3bf65286d317eb9d59ae65286bca2c728f0c9ad..94b91db8009ee96f1cd609b8eb79e63e3a71d21c 100644 (file)
@@ -180,6 +180,12 @@ ngx_http_autoindex_handler(ngx_http_request_t *r)
         return NGX_DECLINED;
     }
 
+    rc = ngx_http_discard_request_body(r);
+
+    if (rc != NGX_OK) {
+        return rc;
+    }
+
     /* NGX_DIR_MASK_LEN is lesser than NGX_HTTP_AUTOINDEX_PREALLOCATE */
 
     last = ngx_http_map_uri_to_path(r, &path, &root,