comparison src/http/ngx_http_upstream.c @ 682:5cb5db9975ba NGINX_1_3_4

nginx 1.3.4 *) Change: the "ipv6only" parameter is now turned on by default for listening IPv6 sockets. *) Feature: the Clang compiler support. *) Bugfix: extra listening sockets might be created. Thanks to Roman Odaisky. *) Bugfix: nginx/Windows might hog CPU if a worker process failed to start. Thanks to Ricardo Villalobos Guevara. *) Bugfix: the "proxy_pass_header", "fastcgi_pass_header", "scgi_pass_header", "uwsgi_pass_header", "proxy_hide_header", "fastcgi_hide_header", "scgi_hide_header", and "uwsgi_hide_header" directives might be inherited incorrectly.
author Igor Sysoev <http://sysoev.ru>
date Tue, 31 Jul 2012 00:00:00 +0400
parents bfa81a0490a2
children b5b7eea22fda
comparison
equal deleted inserted replaced
681:625501f84a6b 682:5cb5db9975ba
4420 4420
4421 if (u->naddrs == 1) { 4421 if (u->naddrs == 1) {
4422 uscf->servers = ngx_array_create(cf->pool, 1, 4422 uscf->servers = ngx_array_create(cf->pool, 1,
4423 sizeof(ngx_http_upstream_server_t)); 4423 sizeof(ngx_http_upstream_server_t));
4424 if (uscf->servers == NULL) { 4424 if (uscf->servers == NULL) {
4425 return NGX_CONF_ERROR; 4425 return NULL;
4426 } 4426 }
4427 4427
4428 us = ngx_array_push(uscf->servers); 4428 us = ngx_array_push(uscf->servers);
4429 if (us == NULL) { 4429 if (us == NULL) {
4430 return NGX_CONF_ERROR; 4430 return NULL;
4431 } 4431 }
4432 4432
4433 ngx_memzero(us, sizeof(ngx_http_upstream_server_t)); 4433 ngx_memzero(us, sizeof(ngx_http_upstream_server_t));
4434 4434
4435 us->addrs = u->addrs; 4435 us->addrs = u->addrs;
4436 us->naddrs = u->naddrs; 4436 us->naddrs = 1;
4437 } 4437 }
4438 4438
4439 uscfp = ngx_array_push(&umcf->upstreams); 4439 uscfp = ngx_array_push(&umcf->upstreams);
4440 if (uscfp == NULL) { 4440 if (uscfp == NULL) {
4441 return NULL; 4441 return NULL;
4539 ngx_hash_key_t *hk; 4539 ngx_hash_key_t *hk;
4540 4540
4541 if (conf->hide_headers == NGX_CONF_UNSET_PTR 4541 if (conf->hide_headers == NGX_CONF_UNSET_PTR
4542 && conf->pass_headers == NGX_CONF_UNSET_PTR) 4542 && conf->pass_headers == NGX_CONF_UNSET_PTR)
4543 { 4543 {
4544 conf->hide_headers = prev->hide_headers;
4545 conf->pass_headers = prev->pass_headers;
4546
4544 conf->hide_headers_hash = prev->hide_headers_hash; 4547 conf->hide_headers_hash = prev->hide_headers_hash;
4545 4548
4546 if (conf->hide_headers_hash.buckets 4549 if (conf->hide_headers_hash.buckets
4547 #if (NGX_HTTP_CACHE) 4550 #if (NGX_HTTP_CACHE)
4548 && ((conf->cache == NULL) == (prev->cache == NULL)) 4551 && ((conf->cache == NULL) == (prev->cache == NULL))
4550 ) 4553 )
4551 { 4554 {
4552 return NGX_OK; 4555 return NGX_OK;
4553 } 4556 }
4554 4557
4555 conf->hide_headers = prev->hide_headers;
4556 conf->pass_headers = prev->pass_headers;
4557
4558 } else { 4558 } else {
4559 if (conf->hide_headers == NGX_CONF_UNSET_PTR) { 4559 if (conf->hide_headers == NGX_CONF_UNSET_PTR) {
4560 conf->hide_headers = prev->hide_headers; 4560 conf->hide_headers = prev->hide_headers;
4561 } 4561 }
4562 4562