Welcome! Log In Create A New Profile

Advanced

[nginx] Discard request body when redirecting to a URL via error_page.

December 23, 2019 10:54AM
details: https://hg.nginx.org/nginx/rev/d0d6cf5031a3
branches:
changeset: 7607:d0d6cf5031a3
user: Ruslan Ermilov <ru@nginx.com>
date: Mon Dec 23 15:45:46 2019 +0300
description:
Discard request body when redirecting to a URL via error_page.

Reported by Bert JW Regeer and Francisco Oca Gonzalez.

diffstat:

src/http/ngx_http_special_response.c | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)

diffs (16 lines):

diff -r db8df9cd84c8 -r d0d6cf5031a3 src/http/ngx_http_special_response.c
--- 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 @@ ngx_http_send_error_page(ngx_http_reques
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) {
_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-devel
Subject Author Views Posted

[nginx] Discard request body when redirecting to a URL via error_page.

ru@nginx.com 599 December 23, 2019 10:54AM



Sorry, you do not have permission to post/reply in this forum.

Online Users

Guests: 187
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready