discard request body before returning 413 error,
this fixes custom 413 page redirection bug introduced in r1456
This commit is contained in:
parent
96b44e1bfb
commit
36d8fd81b9
1 changed files with 1 additions and 0 deletions
|
@ -917,6 +917,7 @@ ngx_http_core_find_config_phase(ngx_http_request_t *r,
|
||||||
"client intended to send too large body: %O bytes",
|
"client intended to send too large body: %O bytes",
|
||||||
r->headers_in.content_length_n);
|
r->headers_in.content_length_n);
|
||||||
|
|
||||||
|
(void) ngx_http_discard_request_body(r);
|
||||||
ngx_http_finalize_request(r, NGX_HTTP_REQUEST_ENTITY_TOO_LARGE);
|
ngx_http_finalize_request(r, NGX_HTTP_REQUEST_ENTITY_TOO_LARGE);
|
||||||
return NGX_OK;
|
return NGX_OK;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue