From 21e3e05eb12145f4f8cd2f83456959328117ffc2 Mon Sep 17 00:00:00 2001 From: Igor Sysoev Date: Tue, 1 Sep 2009 12:47:34 +0000 Subject: discard request body before returning 413 error, this fixes custom 413 page redirection bug introduced in r1456 --- src/http/ngx_http_core_module.c | 1 + 1 file changed, 1 insertion(+) (limited to 'src') 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; } -- cgit