[nginx] svn commit: r4770 - trunk/src/http
mdounin at mdounin.ru
mdounin at mdounin.ru
Mon Jul 30 10:35:26 UTC 2012
Author: mdounin
Date: 2012-07-30 10:35:26 +0000 (Mon, 30 Jul 2012)
New Revision: 4770
URL: http://trac.nginx.org/nginx/changeset/4770/nginx
Log:
Upstream: 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
Modified:
trunk/src/http/ngx_http_upstream.c
Modified: trunk/src/http/ngx_http_upstream.c
===================================================================
--- trunk/src/http/ngx_http_upstream.c 2012-07-29 19:59:06 UTC (rev 4769)
+++ trunk/src/http/ngx_http_upstream.c 2012-07-30 10:35:26 UTC (rev 4770)
@@ -4541,6 +4541,9 @@
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 @@
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;
More information about the nginx-devel
mailing list