[nginx] Upstream: hide_headers_hash inherited regardless of cache settings.

Maxim Dounin mdounin at mdounin.ru
Fri Oct 14 18:13:56 UTC 2016


details:   http://hg.nginx.org/nginx/rev/7e5199f172fb
branches:  
changeset: 6744:7e5199f172fb
user:      Maxim Dounin <mdounin at mdounin.ru>
date:      Fri Oct 14 19:48:26 2016 +0300
description:
Upstream: hide_headers_hash inherited regardless of cache settings.

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.

diffstat:

 src/http/ngx_http_upstream.c |  7 +------
 1 files changed, 1 insertions(+), 6 deletions(-)

diffs (17 lines):

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
@@ -6021,12 +6021,7 @@ ngx_http_upstream_hide_headers_hash(ngx_
 
         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;
         }
 



More information about the nginx-devel mailing list