diff options
author | Igor Sysoev <igor@sysoev.ru> | 2004-09-05 19:54:02 +0000 |
---|---|---|
committer | Igor Sysoev <igor@sysoev.ru> | 2004-09-05 19:54:02 +0000 |
commit | 980a92472cc30271ad7e88eb2dcc43f00e984d4d (patch) | |
tree | b8940cd9e6b8859c78e3c023c1373bae02371f2e /src/http/modules/proxy/ngx_http_proxy_upstream.c | |
parent | b9e344175f4e971284aa14c8fe685936a4957d52 (diff) | |
download | nginx-980a92472cc30271ad7e88eb2dcc43f00e984d4d.tar.gz nginx-980a92472cc30271ad7e88eb2dcc43f00e984d4d.zip |
nginx-0.0.10-2004-09-05-23:54:02 import
Diffstat (limited to 'src/http/modules/proxy/ngx_http_proxy_upstream.c')
-rw-r--r-- | src/http/modules/proxy/ngx_http_proxy_upstream.c | 32 |
1 files changed, 29 insertions, 3 deletions
diff --git a/src/http/modules/proxy/ngx_http_proxy_upstream.c b/src/http/modules/proxy/ngx_http_proxy_upstream.c index 8ac6d506a..5930ceb14 100644 --- a/src/http/modules/proxy/ngx_http_proxy_upstream.c +++ b/src/http/modules/proxy/ngx_http_proxy_upstream.c @@ -113,6 +113,7 @@ static ngx_chain_t *ngx_http_proxy_create_request(ngx_http_proxy_ctx_t *p) ngx_uint_t i; ngx_buf_t *b; ngx_chain_t *chain; + ngx_list_part_t *part; ngx_table_elt_t *header; ngx_http_request_t *r; ngx_http_proxy_upstream_conf_t *uc; @@ -165,8 +166,20 @@ static ngx_chain_t *ngx_http_proxy_create_request(ngx_http_proxy_ctx_t *p) } - header = r->headers_in.headers.elts; - for (i = 0; i < r->headers_in.headers.nelts; i++) { + part = &r->headers_in.headers.part; + header = part->elts; + + for (i = 0; /* void */; i++) { + + if (i >= part->nelts) { + if (part->next == NULL) { + break; + } + + part = part->next; + header = part->elts; + i = 0; + } if (&header[i] == r->headers_in.host) { continue; @@ -274,7 +287,20 @@ static ngx_chain_t *ngx_http_proxy_create_request(ngx_http_proxy_ctx_t *p) } - for (i = 0; i < r->headers_in.headers.nelts; i++) { + part = &r->headers_in.headers.part; + header = part->elts; + + for (i = 0; /* void */; i++) { + + if (i >= part->nelts) { + if (part->next == NULL) { + break; + } + + part = part->next; + header = part->elts; + i = 0; + } if (&header[i] == r->headers_in.host) { continue; |