Mercurial > hg > nginx
diff src/http/modules/ngx_http_uwsgi_module.c @ 5937:5b9f711dc819
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.
author | Maxim Dounin <mdounin@mdounin.ru> |
---|---|
date | Tue, 09 Dec 2014 18:21:55 +0300 |
parents | 8d0cf26ce071 |
children | cd2abf7e7740 |
line wrap: on
line diff
--- a/src/http/modules/ngx_http_uwsgi_module.c +++ b/src/http/modules/ngx_http_uwsgi_module.c @@ -1683,10 +1683,6 @@ ngx_http_uwsgi_merge_loc_conf(ngx_conf_t return NGX_CONF_ERROR; } - if (conf->upstream.ssl == NULL) { - conf->upstream.ssl = prev->upstream.ssl; - } - #endif ngx_conf_merge_str_value(conf->uwsgi_string, prev->uwsgi_string, ""); @@ -1702,13 +1698,15 @@ ngx_http_uwsgi_merge_loc_conf(ngx_conf_t return NGX_CONF_ERROR; } - if (conf->upstream.upstream == NULL) { + if (conf->upstream.upstream == NULL && conf->uwsgi_lengths == NULL) { conf->upstream.upstream = prev->upstream.upstream; - } - - if (conf->uwsgi_lengths == NULL) { + conf->uwsgi_lengths = prev->uwsgi_lengths; conf->uwsgi_values = prev->uwsgi_values; + +#if (NGX_HTTP_SSL) + conf->upstream.ssl = prev->upstream.ssl; +#endif } if (conf->upstream.upstream || conf->uwsgi_lengths) {