Mercurial > hg > nginx
diff src/http/modules/proxy/ngx_http_proxy_handler.c @ 158:d377ee423603
nginx-0.0.1-2003-10-24-10:53:41 import
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Fri, 24 Oct 2003 06:53:41 +0000 |
parents | afc333135a6b |
children | 981e4af2a425 |
line wrap: on
line diff
--- 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_ht /* 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_creat + 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_creat /* 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;