aboutsummaryrefslogtreecommitdiff
path: root/src/http/modules/ngx_http_proxy_module.c
diff options
context:
space:
mode:
authorIgor Sysoev <igor@sysoev.ru>2005-10-03 12:53:14 +0000
committerIgor Sysoev <igor@sysoev.ru>2005-10-03 12:53:14 +0000
commit82dc95eadd3f9cca3619f1797d91ffd751f422ea (patch)
tree4e375369da607f1155b48279281b73afea4fa23e /src/http/modules/ngx_http_proxy_module.c
parent23d23c1e8ecc390ca403e1234a22f4291ee38b23 (diff)
downloadnginx-release-0.2.4.tar.gz
nginx-release-0.2.4.zip
nginx-0.2.4-RELEASE importrelease-0.2.4
*) Feature: the ngx_http_ssi_module supports "$var=text", "$var!=text", "$var=/text/", and "$var!=/text/" expressions in the "if" command. *) Bugfix: in proxying location without trailing slash; the bug had appeared in 0.1.44. *) Bugfix: the segmentation fault may occurred if the "rtsig" method was used; the bug had appeared in 0.2.0.
Diffstat (limited to 'src/http/modules/ngx_http_proxy_module.c')
-rw-r--r--src/http/modules/ngx_http_proxy_module.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/http/modules/ngx_http_proxy_module.c b/src/http/modules/ngx_http_proxy_module.c
index a7fd74172..fd41017d3 100644
--- a/src/http/modules/ngx_http_proxy_module.c
+++ b/src/http/modules/ngx_http_proxy_module.c
@@ -430,7 +430,7 @@ ngx_http_proxy_create_request(ngx_http_request_t *r)
escape = 0;
- loc_len = r->valid_location ? u->conf->location->len - 1 : 0;
+ loc_len = r->valid_location ? u->conf->location->len : 0;
if (plcf->upstream.pass_unparsed_uri && r->valid_unparsed_uri) {
len += r->unparsed_uri.len;
@@ -514,12 +514,12 @@ ngx_http_proxy_create_request(ngx_http_request_t *r)
r->method_name.len + 1);
}
- b->last = ngx_cpymem(b->last, u->conf->uri.data, u->conf->uri.len - 1);
-
if (plcf->upstream.pass_unparsed_uri && r->valid_unparsed_uri) {
b->last = ngx_cpymem(b->last, r->unparsed_uri.data,
r->unparsed_uri.len);
} else {
+ b->last = ngx_cpymem(b->last, u->conf->uri.data, u->conf->uri.len);
+
if (escape) {
ngx_escape_uri(b->last, r->uri.data + loc_len,
r->uri.len - loc_len, NGX_ESCAPE_URI);