changeset 2929:37b7cd336fdf

inherit proxy_set_header, proxy_hide_header, and fastcgi_hide_header only if cache settings are similar
author Igor Sysoev <igor@sysoev.ru>
date Mon, 08 Jun 2009 12:33:11 +0000
parents 7b68caedea01
children f4acb784b53c
files src/http/modules/ngx_http_proxy_module.c src/http/ngx_http_upstream.c
diffstat 2 files changed, 6 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- 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;
     }
 
--- 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;
         }