]> git.kaiwu.me - nginx.git/commitdiff
Upstream: hide_headers_hash inherited regardless of cache settings.
authorMaxim Dounin <mdounin@mdounin.ru>
Fri, 14 Oct 2016 16:48:26 +0000 (19:48 +0300)
committerMaxim Dounin <mdounin@mdounin.ru>
Fri, 14 Oct 2016 16:48:26 +0000 (19:48 +0300)
Dependency on cache settings existed prior to 2728c4e4a9ae (0.8.44)
as Set-Cookie header was automatically hidden from responses when
using cache.  This is no longer the case, and hide_headers_hash can
be safely inherited regardless of cache settings.

src/http/ngx_http_upstream.c

index ceb798fecff151910f1792c54095bbee1c555567..c2afa0cd5fb6fcdb6050958ea3d321c4ebce5e0e 100644 (file)
@@ -6021,12 +6021,7 @@ 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 (NGX_HTTP_CACHE)
-            && ((conf->cache == 0) == (prev->cache == 0))
-#endif
-           )
-        {
+        if (conf->hide_headers_hash.buckets) {
             return NGX_OK;
         }