diff options
author | Igor Sysoev <igor@sysoev.ru> | 2006-02-03 12:58:48 +0000 |
---|---|---|
committer | Igor Sysoev <igor@sysoev.ru> | 2006-02-03 12:58:48 +0000 |
commit | 8290d287b40f017404ef90dc93cc793f987d1492 (patch) | |
tree | 1f69eb2c85bb6f839ec654dd8826b9c839167e8c /src/http/modules/ngx_http_proxy_module.c | |
parent | 3d1679b4b03162ec477a90dce2088ab40aee830f (diff) | |
download | nginx-8290d287b40f017404ef90dc93cc793f987d1492.tar.gz nginx-8290d287b40f017404ef90dc93cc793f987d1492.zip |
nginx-0.3.26-RELEASE importrelease-0.3.26
*) 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.
Diffstat (limited to 'src/http/modules/ngx_http_proxy_module.c')
-rw-r--r-- | src/http/modules/ngx_http_proxy_module.c | 8 |
1 files changed, 5 insertions, 3 deletions
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 { |