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 8d83c44..f99b910 100644 --- a/src/http/ngx_http_core_module.c +++ b/src/http/ngx_http_core_module.c
@@ -917,6 +917,7 @@ "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; }