aboutsummaryrefslogtreecommitdiff
path: root/src/http/modules/ngx_http_fastcgi_module.c
diff options
context:
space:
mode:
authorMaxim Dounin <mdounin@mdounin.ru>2014-12-09 18:21:55 +0300
committerMaxim Dounin <mdounin@mdounin.ru>2014-12-09 18:21:55 +0300
commitc863e1b3b56e647b9cc9c9aeed53a9ab309194ed (patch)
treea93d708bb96b5183047dabcb367a0deeada2a631 /src/http/modules/ngx_http_fastcgi_module.c
parent88ed2d39afcc00d46a640de542f6b491413e38d6 (diff)
downloadnginx-c863e1b3b56e647b9cc9c9aeed53a9ab309194ed.tar.gz
nginx-c863e1b3b56e647b9cc9c9aeed53a9ab309194ed.zip
Upstream: inheritance of proxy_pass and friends (ticket #645).
Instead of independant inheritance of conf->upstream.upstream (proxy_pass without variables) and conf->proxy_lengths (proxy_pass with variables) we now test them both and inherit only if neither is set. Additionally, SSL context is also inherited only in this case now. Based on the patch by Alexey Radkov.
Diffstat (limited to 'src/http/modules/ngx_http_fastcgi_module.c')
-rw-r--r--src/http/modules/ngx_http_fastcgi_module.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/http/modules/ngx_http_fastcgi_module.c b/src/http/modules/ngx_http_fastcgi_module.c
index cc93570b1..2ab40fbfd 100644
--- a/src/http/modules/ngx_http_fastcgi_module.c
+++ b/src/http/modules/ngx_http_fastcgi_module.c
@@ -2697,11 +2697,8 @@ ngx_http_fastcgi_merge_loc_conf(ngx_conf_t *cf, void *parent, void *child)
return NGX_CONF_ERROR;
}
- if (conf->upstream.upstream == NULL) {
+ if (conf->upstream.upstream == NULL && conf->fastcgi_lengths == NULL) {
conf->upstream.upstream = prev->upstream.upstream;
- }
-
- if (conf->fastcgi_lengths == NULL) {
conf->fastcgi_lengths = prev->fastcgi_lengths;
conf->fastcgi_values = prev->fastcgi_values;
}