diff options
Diffstat (limited to 'src/http/modules/ngx_http_proxy_module.c')
-rw-r--r-- | src/http/modules/ngx_http_proxy_module.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/http/modules/ngx_http_proxy_module.c b/src/http/modules/ngx_http_proxy_module.c index e8d310753..f8dfdc4e1 100644 --- a/src/http/modules/ngx_http_proxy_module.c +++ b/src/http/modules/ngx_http_proxy_module.c @@ -487,7 +487,8 @@ ngx_http_proxy_create_request(ngx_http_request_t *r) escape = 0; - loc_len = r->valid_location ? u->conf->location.len : 0; + loc_len = (r->valid_location && u->conf->uri.len) ? u->conf->location.len: + 0; if (u->conf->uri.len == 0 && r->valid_unparsed_uri && r == r->main) { unparsed_uri = 1; |