From: Igor Sysoev Date: Tue, 1 Sep 2009 12:47:34 +0000 (+0000) Subject: discard request body before returning 413 error, X-Git-Tag: release-0.8.14~8 X-Git-Url: http://git.kaiwu.me/%7B@url%7D?a=commitdiff_plain;h=21e3e05eb12145f4f8cd2f83456959328117ffc2;p=nginx.git discard request body before returning 413 error, this fixes custom 413 page redirection bug introduced in r1456 --- diff --git a/src/http/ngx_http_core_module.c b/src/http/ngx_http_core_module.c index 8d83c440e..f99b91031 100644 --- a/src/http/ngx_http_core_module.c +++ b/src/http/ngx_http_core_module.c @@ -917,6 +917,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; }