# HG changeset patch # User Igor Sysoev # Date 1244464391 0 # Node ID 37b7cd336fdff38aaa4cf4970734d58e99dfddde # Parent 7b68caedea01a8656aed5ce4d971b00abdd586c0 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 --- 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 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 --- 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->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; }