From: Igor Sysoev Date: Mon, 8 Jun 2009 12:33:11 +0000 (+0000) Subject: inherit proxy_set_header, proxy_hide_header, and fastcgi_hide_header X-Git-Tag: release-0.8.1~1 X-Git-Url: http://www.kaiwu.me/postgresql/commit/?a=commitdiff_plain;h=83c93ba1093191ea73e894b747cc181168adb4f7;p=nginx.git inherit proxy_set_header, proxy_hide_header, and fastcgi_hide_header only if cache settings are similar --- diff --git a/src/http/modules/ngx_http_proxy_module.c b/src/http/modules/ngx_http_proxy_module.c index 5f48a0c82..f0aadb402 100644 --- a/src/http/modules/ngx_http_proxy_module.c +++ b/src/http/modules/ngx_http_proxy_module.c @@ -2342,7 +2342,9 @@ ngx_http_proxy_merge_headers(ngx_conf_t *cf, ngx_http_proxy_loc_conf_t *conf, conf->headers_source = prev->headers_source; } - if (conf->headers_set_hash.buckets) { + if (conf->headers_set_hash.buckets + && ((conf->upstream.cache == NULL) == (prev->upstream.cache == NULL))) + { return NGX_OK; } diff --git a/src/http/ngx_http_upstream.c b/src/http/ngx_http_upstream.c index 747084528..87df57169 100644 --- a/src/http/ngx_http_upstream.c +++ b/src/http/ngx_http_upstream.c @@ -4085,7 +4085,9 @@ ngx_http_upstream_hide_headers_hash(ngx_conf_t *cf, { conf->hide_headers_hash = prev->hide_headers_hash; - if (conf->hide_headers_hash.buckets) { + if (conf->hide_headers_hash.buckets + && ((conf->cache == NULL) == (prev->cache == NULL))) + { return NGX_OK; }