inherit proxy_set_header, proxy_hide_header, and fastcgi_hide_header

only if cache settings are similar
This commit is contained in:
Igor Sysoev 2009-06-08 12:33:11 +00:00
parent 2d65078eff
commit 83c93ba109
2 changed files with 6 additions and 2 deletions

View File

@ -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;
}

View File

@ -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;
}