]> git.kaiwu.me - nginx.git/commitdiff
inherit proxy_set_header, proxy_hide_header, and fastcgi_hide_header
authorIgor Sysoev <igor@sysoev.ru>
Mon, 8 Jun 2009 12:33:11 +0000 (12:33 +0000)
committerIgor Sysoev <igor@sysoev.ru>
Mon, 8 Jun 2009 12:33:11 +0000 (12:33 +0000)
only if cache settings are similar

src/http/modules/ngx_http_proxy_module.c
src/http/ngx_http_upstream.c

index 5f48a0c82ff84a57af64449e1ee59b68de255ae9..f0aadb4022e6990bbea1ec1fbe209ab960df3898 100644 (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;
     }
 
index 747084528a0e1f9d5f6692327d5a7b810ba1c913..87df5716973a824703ea63acc33dfae76aadd585 100644 (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;
         }