[nginx] Autoindex: discard request body (ticket #1439).

Maxim Dounin mdounin at mdounin.ru
Mon Dec 4 15:15:40 UTC 2017


details:   http://hg.nginx.org/nginx/rev/044cb349fd3c
branches:  
changeset: 7164:044cb349fd3c
user:      Maxim Dounin <mdounin at mdounin.ru>
date:      Mon Dec 04 17:30:02 2017 +0300
description:
Autoindex: discard request body (ticket #1439).

diffstat:

 src/http/modules/ngx_http_autoindex_module.c |  6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diffs (16 lines):

diff --git a/src/http/modules/ngx_http_autoindex_module.c b/src/http/modules/ngx_http_autoindex_module.c
--- a/src/http/modules/ngx_http_autoindex_module.c
+++ b/src/http/modules/ngx_http_autoindex_module.c
@@ -180,6 +180,12 @@ ngx_http_autoindex_handler(ngx_http_requ
         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,


More information about the nginx-devel mailing list