diff options
author | Roman Arutyunyan <arut@nginx.com> | 2017-11-20 13:47:17 +0300 |
---|---|---|
committer | Roman Arutyunyan <arut@nginx.com> | 2017-11-20 13:47:17 +0300 |
commit | de11c2ad09286fe728b357a41543f3ba219f8986 (patch) | |
tree | efd76d47d6d86d4645133eef25979220f1debadd /src/http/modules/ngx_http_proxy_module.c | |
parent | 7b3f187bc6700a85b9cde04c063de59f4690b10c (diff) | |
download | nginx-de11c2ad09286fe728b357a41543f3ba219f8986.tar.gz nginx-de11c2ad09286fe728b357a41543f3ba219f8986.zip |
Proxy: simplified conditions of using unparsed uri.
Previously, the unparsed uri was explicitly allowed to be used only by the main
request. However the valid_unparsed_uri flag is nonzero only in the main
request, which makes the main request check pointless.
Diffstat (limited to 'src/http/modules/ngx_http_proxy_module.c')
-rw-r--r-- | src/http/modules/ngx_http_proxy_module.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/http/modules/ngx_http_proxy_module.c b/src/http/modules/ngx_http_proxy_module.c index b42839c24..6bbbfaebf 100644 --- a/src/http/modules/ngx_http_proxy_module.c +++ b/src/http/modules/ngx_http_proxy_module.c @@ -1086,8 +1086,7 @@ ngx_http_proxy_create_key(ngx_http_request_t *r) return NGX_OK; - } else if (ctx->vars.uri.len == 0 && r->valid_unparsed_uri && r == r->main) - { + } else if (ctx->vars.uri.len == 0 && r->valid_unparsed_uri) { *key = r->unparsed_uri; u->uri = r->unparsed_uri; @@ -1201,8 +1200,7 @@ ngx_http_proxy_create_request(ngx_http_request_t *r) if (plcf->proxy_lengths && ctx->vars.uri.len) { uri_len = ctx->vars.uri.len; - } else if (ctx->vars.uri.len == 0 && r->valid_unparsed_uri && r == r->main) - { + } else if (ctx->vars.uri.len == 0 && r->valid_unparsed_uri) { unparsed_uri = 1; uri_len = r->unparsed_uri.len; |