From 8290d287b40f017404ef90dc93cc793f987d1492 Mon Sep 17 00:00:00 2001 From: Igor Sysoev Date: Fri, 3 Feb 2006 12:58:48 +0000 Subject: nginx-0.3.26-RELEASE import *) Change: the "optimize_host_names" directive was renamed to the "optimize_server_names". *) Bugfix: if in the "proxy_pass" directive was no the URI part, then the main request URI was transferred to a backend while proxying the SSI subrequest. --- src/http/modules/ngx_http_proxy_module.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src/http/modules/ngx_http_proxy_module.c') diff --git a/src/http/modules/ngx_http_proxy_module.c b/src/http/modules/ngx_http_proxy_module.c index c85f587f6..579da9465 100644 --- a/src/http/modules/ngx_http_proxy_module.c +++ b/src/http/modules/ngx_http_proxy_module.c @@ -442,7 +442,7 @@ static ngx_int_t ngx_http_proxy_create_request(ngx_http_request_t *r) { size_t len, loc_len, body_len; - ngx_uint_t i, key; + ngx_uint_t i, key, unparsed_uri; uintptr_t escape; ngx_buf_t *b; ngx_str_t *hh, method; @@ -488,10 +488,12 @@ ngx_http_proxy_create_request(ngx_http_request_t *r) loc_len = r->valid_location ? u->conf->location.len : 0; - if (u->conf->uri.len == 0 && r->valid_unparsed_uri) { + if (u->conf->uri.len == 0 && r->valid_unparsed_uri && r == r->main) { + unparsed_uri = 1; len += r->unparsed_uri.len; } else { + unparsed_uri = 0; if (r->quoted_uri) { escape = 2 * ngx_escape_uri(NULL, r->uri.data + loc_len, r->uri.len - loc_len, NGX_ESCAPE_URI); @@ -581,7 +583,7 @@ ngx_http_proxy_create_request(ngx_http_request_t *r) u->uri.data = b->last; - if (u->conf->uri.len == 0 && r->valid_unparsed_uri) { + if (unparsed_uri) { b->last = ngx_copy(b->last, r->unparsed_uri.data, r->unparsed_uri.len); } else { -- cgit