# HG changeset patch # User Igor Sysoev # Date 1256578807 0 # Node ID ff7e1ec2c9a4e35472457f8775d52045e4540b26 # Parent cfc35172c7fd19653143f7a97b57bb4bdeceaa77 merge r3079: 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 --- a/src/http/ngx_http_core_module.c +++ b/src/http/ngx_http_core_module.c @@ -885,6 +885,7 @@ ngx_http_core_find_config_phase(ngx_http "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; }