[nginx] svn commit: r4805 - in branches/stable-1.2: . src/http
mdounin at mdounin.ru
mdounin at mdounin.ru
Mon Aug 6 17:34:09 UTC 2012
Author: mdounin
Date: 2012-08-06 17:34:08 +0000 (Mon, 06 Aug 2012)
New Revision: 4805
URL: http://trac.nginx.org/nginx/changeset/4805/nginx
Log:
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
Modified:
branches/stable-1.2/
branches/stable-1.2/src/http/ngx_http_upstream.c
Index: branches/stable-1.2
===================================================================
--- branches/stable-1.2 2012-08-06 17:31:32 UTC (rev 4804)
+++ branches/stable-1.2 2012-08-06 17:34:08 UTC (rev 4805)
Property changes on: branches/stable-1.2
___________________________________________________________________
Modified: svn:mergeinfo
## -1 +1 ##
-/trunk:4611-4632,4636-4657,4671-4672,4674-4676,4682,4684-4699,4704-4706,4713,4736-4738,4740-4741,4754,4756-4769
+/trunk:4611-4632,4636-4657,4671-4672,4674-4676,4682,4684-4699,4704-4706,4713,4736-4738,4740-4741,4754,4756-4770
\ No newline at end of property
Modified: branches/stable-1.2/src/http/ngx_http_upstream.c
===================================================================
--- branches/stable-1.2/src/http/ngx_http_upstream.c 2012-08-06 17:31:32 UTC (rev 4804)
+++ branches/stable-1.2/src/http/ngx_http_upstream.c 2012-08-06 17:34:08 UTC (rev 4805)
@@ -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