mirror of
https://github.com/nginx/nginx.git
synced 2025-06-10 11:38:36 +08:00
Discard request body when redirecting to a URL via error_page.
Reported by Bert JW Regeer and Francisco Oca Gonzalez.
This commit is contained in:
parent
4c031f9a6a
commit
c1be55f972
@ -623,6 +623,12 @@ ngx_http_send_error_page(ngx_http_request_t *r, ngx_http_err_page_t *err_page)
|
|||||||
return ngx_http_named_location(r, &uri);
|
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);
|
location = ngx_list_push(&r->headers_out.headers);
|
||||||
|
|
||||||
if (location == NULL) {
|
if (location == NULL) {
|
||||||
|
Loading…
Reference in New Issue
Block a user