summaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorIgor Sysoev <igor@sysoev.ru>2009-09-01 12:47:34 +0000
committerIgor Sysoev <igor@sysoev.ru>2009-09-01 12:47:34 +0000
commit21e3e05eb12145f4f8cd2f83456959328117ffc2 (patch)
tree7998abd9e7e3cbd5717f52ab540e683f98b8bcfd /src
parentb4cc2fc0d72248d78e85f394478fa25da73af509 (diff)
downloadnginx-21e3e05eb12145f4f8cd2f83456959328117ffc2.tar.gz
nginx-21e3e05eb12145f4f8cd2f83456959328117ffc2.tar.bz2
discard request body before returning 413 error,
this fixes custom 413 page redirection bug introduced in r1456
Diffstat (limited to 'src')
-rw-r--r--src/http/ngx_http_core_module.c1
1 files changed, 1 insertions, 0 deletions
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;
}