aboutsummaryrefslogtreecommitdiff
path: root/src/http/modules/proxy/ngx_http_proxy_handler.c
diff options
context:
space:
mode:
authorIgor Sysoev <igor@sysoev.ru>2003-10-24 06:53:41 +0000
committerIgor Sysoev <igor@sysoev.ru>2003-10-24 06:53:41 +0000
commit12b4b00784bbc3cd934e2f2bbee79679684629e3 (patch)
tree602dfdcdc4fe5b21c17366eacfae63efcb03770e /src/http/modules/proxy/ngx_http_proxy_handler.c
parent8556e6da41e80772cb9710e4309d9ad44a7b360e (diff)
downloadnginx-12b4b00784bbc3cd934e2f2bbee79679684629e3.tar.gz
nginx-12b4b00784bbc3cd934e2f2bbee79679684629e3.zip
nginx-0.0.1-2003-10-24-10:53:41 import
Diffstat (limited to 'src/http/modules/proxy/ngx_http_proxy_handler.c')
-rw-r--r--src/http/modules/proxy/ngx_http_proxy_handler.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/http/modules/proxy/ngx_http_proxy_handler.c b/src/http/modules/proxy/ngx_http_proxy_handler.c
index 888c912f8..628eeeca3 100644
--- a/src/http/modules/proxy/ngx_http_proxy_handler.c
+++ b/src/http/modules/proxy/ngx_http_proxy_handler.c
@@ -188,8 +188,6 @@ static int ngx_http_proxy_handler(ngx_http_request_t *r)
/* STUB */ p->accel = 1;
- p->host_header = p->upstream.peers->peers[0].host;
-
ngx_test_null(p->request_hunks, ngx_http_proxy_create_request(p),
NGX_HTTP_INTERNAL_SERVER_ERROR);
@@ -220,7 +218,7 @@ static ngx_chain_t *ngx_http_proxy_create_request(ngx_http_proxy_ctx_t *p)
+ r->uri.len - p->location_len
+ 1 + r->args.len /* 1 is for "?" */
+ sizeof(http_version) - 1
- + sizeof(host_header) - 1 + p->host_header.len + 2
+ + sizeof(host_header) - 1 + p->lcf->upstream->host_header.len + 2
/* 2 is for "\r\n" */
+ sizeof(connection_close_header) - 1
+ 2; /* 2 is for "\r\n" at the header end */
@@ -268,7 +266,8 @@ static ngx_chain_t *ngx_http_proxy_create_request(ngx_http_proxy_ctx_t *p)
/* the "Host" header */
h->last = ngx_cpymem(h->last, host_header, sizeof(host_header) - 1);
- h->last = ngx_cpymem(h->last, p->host_header.data, p->host_header.len);
+ h->last = ngx_cpymem(h->last, p->lcf->upstream->host_header.data,
+ p->lcf->upstream->host_header.len);
*(h->last++) = CR; *(h->last++) = LF;