From: Roman Arutyunyan Date: Mon, 20 Nov 2017 18:11:19 +0000 (+0300) Subject: Inherit valid_unparsed_uri in cloned subrequests (ticket #1430). X-Git-Tag: release-1.13.8~14 X-Git-Url: http://www.kaiwu.me/postgresql/commit/?a=commitdiff_plain;h=891908cd0cdf72fca7d4b3de4a8a6fa3602e5cf7;p=nginx.git Inherit valid_unparsed_uri in cloned subrequests (ticket #1430). Inheriting this flag will make the cloned subrequest behave consistently with the parent. Specifically, the upstream HTTP request and cache key created by the proxy module may depend directly on unparsed_uri if valid_unparsed_uri flag is set. Previously, the flag was zero for cloned requests, which could make background update proxy a request different than its parent and cache the result with a different key. For example, if client URI contained the escaped slash character %2F, it was used as is by the proxy module in the main request, but was unescaped in the subrequests. Similar problems exist in the slice module. --- diff --git a/src/http/ngx_http_core_module.c b/src/http/ngx_http_core_module.c index 57a47427f..59515712b 100644 --- a/src/http/ngx_http_core_module.c +++ b/src/http/ngx_http_core_module.c @@ -2363,6 +2363,7 @@ ngx_http_subrequest(ngx_http_request_t *r, sr->method_name = r->method_name; sr->loc_conf = r->loc_conf; sr->valid_location = r->valid_location; + sr->valid_unparsed_uri = r->valid_unparsed_uri; sr->content_handler = r->content_handler; sr->phase_handler = r->phase_handler; sr->write_event_handler = ngx_http_core_run_phases;