]> git.kaiwu.me - nginx.git/commitdiff
merge r3079:
authorIgor Sysoev <igor@sysoev.ru>
Mon, 26 Oct 2009 17:40:07 +0000 (17:40 +0000)
committerIgor Sysoev <igor@sysoev.ru>
Mon, 26 Oct 2009 17:40:07 +0000 (17:40 +0000)
discard request body before returning 413 error,
this fixes custom 413 page redirection bug introduced in r1456

src/http/ngx_http_core_module.c

index e79dd1cd2f6aa5fe514e9c138779fa2fc18d0846..799dfc856702568b38e1a26972e59bc20264a582 100644 (file)
@@ -885,6 +885,7 @@ ngx_http_core_find_config_phase(ngx_http_request_t *r,
                       "client intended to send too large body: %O bytes",
                       r->headers_in.content_length_n);
 
+        (void) ngx_http_discard_request_body(r);
         ngx_http_finalize_request(r, NGX_HTTP_REQUEST_ENTITY_TOO_LARGE);
         return NGX_OK;
     }