Mercurial > hg > nginx
comparison src/http/ngx_http_special_response.c @ 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 | 170922952477 |
children | ecc0ae881a25 |
comparison
equal
deleted
inserted
replaced
7606:db8df9cd84c8 | 7607:d0d6cf5031a3 |
---|---|
621 | 621 |
622 if (uri.len && uri.data[0] == '@') { | 622 if (uri.len && uri.data[0] == '@') { |
623 return ngx_http_named_location(r, &uri); | 623 return ngx_http_named_location(r, &uri); |
624 } | 624 } |
625 | 625 |
626 r->expect_tested = 1; | |
627 | |
628 if (ngx_http_discard_request_body(r) != NGX_OK) { | |
629 r->keepalive = 0; | |
630 } | |
631 | |
626 location = ngx_list_push(&r->headers_out.headers); | 632 location = ngx_list_push(&r->headers_out.headers); |
627 | 633 |
628 if (location == NULL) { | 634 if (location == NULL) { |
629 return NGX_ERROR; | 635 return NGX_ERROR; |
630 } | 636 } |