Welcome! Log In Create A New Profile

Advanced

[nginx] Inherit valid_unparsed_uri in cloned subrequests (ticket #1430).

Roman Arutyunyan
December 05, 2017 01:16PM
details: http://hg.nginx.org/nginx/rev/46ebff8c6396
branches:
changeset: 7168:46ebff8c6396
user: Roman Arutyunyan <arut@nginx.com>
date: Mon Nov 20 21:11:19 2017 +0300
description:
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.

diffstat:

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

diffs (11 lines):

diff -r 8530aea9aa50 -r 46ebff8c6396 src/http/ngx_http_core_module.c
--- a/src/http/ngx_http_core_module.c Mon Nov 20 13:47:17 2017 +0300
+++ b/src/http/ngx_http_core_module.c Mon Nov 20 21:11:19 2017 +0300
@@ -2363,6 +2363,7 @@ ngx_http_subrequest(ngx_http_request_t *
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;
_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-devel
Subject Author Views Posted

[nginx] Inherit valid_unparsed_uri in cloned subrequests (ticket #1430).

Roman Arutyunyan 382 December 05, 2017 01:16PM



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

Online Users

Guests: 261
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