Welcome! Log In Create A New Profile

Advanced

[nginx] Proxy: simplified conditions of using unparsed uri.

Roman Arutyunyan
December 05, 2017 01:16PM
details: http://hg.nginx.org/nginx/rev/8530aea9aa50
branches:
changeset: 7167:8530aea9aa50
user: Roman Arutyunyan <arut@nginx.com>
date: Mon Nov 20 13:47:17 2017 +0300
description:
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:

src/http/modules/ngx_http_proxy_module.c | 6 ++----
1 files changed, 2 insertions(+), 4 deletions(-)

diffs (23 lines):

diff -r a762ddf22dbb -r 8530aea9aa50 src/http/modules/ngx_http_proxy_module.c
--- a/src/http/modules/ngx_http_proxy_module.c Fri Dec 01 15:59:14 2017 -0800
+++ b/src/http/modules/ngx_http_proxy_module.c Mon Nov 20 13:47:17 2017 +0300
@@ -1086,8 +1086,7 @@ ngx_http_proxy_create_key(ngx_http_reque

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_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;

_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-devel
Subject Author Views Posted

[nginx] Proxy: simplified conditions of using unparsed uri.

Roman Arutyunyan 383 December 05, 2017 01:16PM



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

Online Users

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