comparison src/http/modules/proxy/ngx_http_proxy_header.c @ 50:72eb30262aac NGINX_0_1_25

nginx 0.1.25 *) Bugfix: nginx did run on Linux parisc. *) Feature: nginx now does not start under FreeBSD if the sysctl kern.ipc.somaxconn value is too big. *) Bugfix: if a request was internally redirected by the ngx_http_index_module module to the ngx_http_proxy_module or ngx_http_fastcgi_module modules, then the index file was not closed after request completion. *) Feature: the "proxy_pass" can be used in location with regular expression. *) Feature: the ngx_http_rewrite_filter_module module supports the condition like "if ($HTTP_USER_AGENT ~ MSIE)". *) Bugfix: nginx started too slow if the large number of addresses and text values were used in the "geo" directive. *) Change: a variable name must be declared as "$name" in the "geo" directive. The previous variant without "$" is still supported, but will be removed soon. *) Feature: the "%{VARIABLE}v" logging parameter. *) Feature: the "set $name value" directive. *) Bugfix: gcc 4.0 compatibility. *) Feature: the --with-openssl-opt=OPTIONS autoconfiguration directive.
author Igor Sysoev <http://sysoev.ru>
date Sat, 19 Mar 2005 00:00:00 +0300
parents 7ca9bdc82b3f
children
comparison
equal deleted inserted replaced
49:93dabbc9efb9 50:72eb30262aac
85 } 85 }
86 86
87 87
88 /* copy some header pointers and set up r->headers_out */ 88 /* copy some header pointers and set up r->headers_out */
89 89
90 if (!(ho = ngx_list_push(&r->headers_out.headers))) { 90 ho = ngx_list_push(&r->headers_out.headers);
91 if (ho == NULL) {
91 return NGX_ERROR; 92 return NGX_ERROR;
92 } 93 }
93 94
94 *ho = h[i]; 95 *ho = h[i];
95 96
160 ngx_http_proxy_upstream_conf_t *uc; 161 ngx_http_proxy_upstream_conf_t *uc;
161 162
162 r = p->request; 163 r = p->request;
163 uc = p->lcf->upstream; 164 uc = p->lcf->upstream;
164 165
165 if (!(location = ngx_list_push(&r->headers_out.headers))) { 166 location = ngx_list_push(&r->headers_out.headers);
167 if (location == NULL) {
166 return NGX_ERROR; 168 return NGX_ERROR;
167 } 169 }
168 170
169 if (p->lcf->preserve_host 171 if (p->lcf->preserve_host
170 || uc->url.len > loc->value.len 172 || uc->url.len > loc->value.len
187 location->key.len = 0; 189 location->key.len = 0;
188 location->key.data = NULL; 190 location->key.data = NULL;
189 191
190 location->value.len = uc->location->len 192 location->value.len = uc->location->len
191 + (loc->value.len - uc->url.len) + 1; 193 + (loc->value.len - uc->url.len) + 1;
192 if (!(location->value.data = ngx_palloc(r->pool, location->value.len))) { 194 location->value.data = ngx_palloc(r->pool, location->value.len);
195 if (location->value.data == NULL) {
193 return NGX_ERROR; 196 return NGX_ERROR;
194 } 197 }
195 198
196 last = ngx_cpymem(location->value.data, 199 last = ngx_cpymem(location->value.data,
197 uc->location->data, uc->location->len); 200 uc->location->data, uc->location->len);