Mercurial > hg > nginx
changeset 7607:d0d6cf5031a3
Discard request body when redirecting to a URL via error_page.
Reported by Bert JW Regeer and Francisco Oca Gonzalez.
author | Ruslan Ermilov <ru@nginx.com> |
---|---|
date | Mon, 23 Dec 2019 15:45:46 +0300 |
parents | db8df9cd84c8 |
children | 4718a646187a |
files | src/http/ngx_http_special_response.c |
diffstat | 1 files changed, 6 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/src/http/ngx_http_special_response.c Mon Dec 16 15:19:01 2019 +0300 +++ b/src/http/ngx_http_special_response.c Mon Dec 23 15:45:46 2019 +0300 @@ -623,6 +623,12 @@ return ngx_http_named_location(r, &uri); } + r->expect_tested = 1; + + if (ngx_http_discard_request_body(r) != NGX_OK) { + r->keepalive = 0; + } + location = ngx_list_push(&r->headers_out.headers); if (location == NULL) {