Mercurial > hg > nginx-quic
changeset 4804:56fcb5767f06 stable-1.2
Merge of r4770: hide_headers/pass_headers inheritance fix.
Hide headers and pass headers arrays might not be inherited correctly
into a nested location, e.g. in configuration like
server {
proxy_hide_header X-Foo;
location / {
location /nested/ {
proxy_pass_header X-Pad;
}
}
}
the X-Foo header wasn't hidden in the location /nested/.
Reported by Konstantin Svist,
http://mailman.nginx.org/pipermail/nginx-ru/2012-July/047555.html
author | Maxim Dounin <mdounin@mdounin.ru> |
---|---|
date | Mon, 06 Aug 2012 17:34:08 +0000 |
parents | 92a620dd8036 |
children | 655a4ef244fa |
files | src/http/ngx_http_upstream.c |
diffstat | 1 files changed, 3 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/src/http/ngx_http_upstream.c +++ b/src/http/ngx_http_upstream.c @@ -4541,6 +4541,9 @@ ngx_http_upstream_hide_headers_hash(ngx_ if (conf->hide_headers == NGX_CONF_UNSET_PTR && conf->pass_headers == NGX_CONF_UNSET_PTR) { + conf->hide_headers = prev->hide_headers; + conf->pass_headers = prev->pass_headers; + conf->hide_headers_hash = prev->hide_headers_hash; if (conf->hide_headers_hash.buckets @@ -4552,9 +4555,6 @@ ngx_http_upstream_hide_headers_hash(ngx_ return NGX_OK; } - conf->hide_headers = prev->hide_headers; - conf->pass_headers = prev->pass_headers; - } else { if (conf->hide_headers == NGX_CONF_UNSET_PTR) { conf->hide_headers = prev->hide_headers;