# HG changeset patch # User Igor Sysoev # Date 1251809254 0 # Node ID 680cab09818dccf054e4939f02c1c38964014af9 # Parent 98f03cd8d6ccb14e9f545d8d420786aa8a4fa70e discard request body before returning 413 error, this fixes custom 413 page redirection bug introduced in r1456 diff -r 98f03cd8d6cc -r 680cab09818d src/http/ngx_http_core_module.c --- a/src/http/ngx_http_core_module.c Tue Sep 01 12:40:27 2009 +0000 +++ b/src/http/ngx_http_core_module.c Tue Sep 01 12:47:34 2009 +0000 @@ -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; }