Mercurial > hg > nginx-quic
comparison src/http/ngx_http_upstream.c @ 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 | 6fc86fe0b586 |
children | 826ca1b53376 |
comparison
equal
deleted
inserted
replaced
4803:92a620dd8036 | 4804:56fcb5767f06 |
---|---|
4539 ngx_hash_key_t *hk; | 4539 ngx_hash_key_t *hk; |
4540 | 4540 |
4541 if (conf->hide_headers == NGX_CONF_UNSET_PTR | 4541 if (conf->hide_headers == NGX_CONF_UNSET_PTR |
4542 && conf->pass_headers == NGX_CONF_UNSET_PTR) | 4542 && conf->pass_headers == NGX_CONF_UNSET_PTR) |
4543 { | 4543 { |
4544 conf->hide_headers = prev->hide_headers; | |
4545 conf->pass_headers = prev->pass_headers; | |
4546 | |
4544 conf->hide_headers_hash = prev->hide_headers_hash; | 4547 conf->hide_headers_hash = prev->hide_headers_hash; |
4545 | 4548 |
4546 if (conf->hide_headers_hash.buckets | 4549 if (conf->hide_headers_hash.buckets |
4547 #if (NGX_HTTP_CACHE) | 4550 #if (NGX_HTTP_CACHE) |
4548 && ((conf->cache == NULL) == (prev->cache == NULL)) | 4551 && ((conf->cache == NULL) == (prev->cache == NULL)) |
4550 ) | 4553 ) |
4551 { | 4554 { |
4552 return NGX_OK; | 4555 return NGX_OK; |
4553 } | 4556 } |
4554 | 4557 |
4555 conf->hide_headers = prev->hide_headers; | |
4556 conf->pass_headers = prev->pass_headers; | |
4557 | |
4558 } else { | 4558 } else { |
4559 if (conf->hide_headers == NGX_CONF_UNSET_PTR) { | 4559 if (conf->hide_headers == NGX_CONF_UNSET_PTR) { |
4560 conf->hide_headers = prev->hide_headers; | 4560 conf->hide_headers = prev->hide_headers; |
4561 } | 4561 } |
4562 | 4562 |