Mercurial > hg > nginx-quic
comparison 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 |
comparison
equal
deleted
inserted
replaced
5936:2d3908516101 | 5937:5b9f711dc819 |
---|---|
1681 | 1681 |
1682 if (conf->ssl && ngx_http_uwsgi_set_ssl(cf, conf) != NGX_OK) { | 1682 if (conf->ssl && ngx_http_uwsgi_set_ssl(cf, conf) != NGX_OK) { |
1683 return NGX_CONF_ERROR; | 1683 return NGX_CONF_ERROR; |
1684 } | 1684 } |
1685 | 1685 |
1686 if (conf->upstream.ssl == NULL) { | |
1687 conf->upstream.ssl = prev->upstream.ssl; | |
1688 } | |
1689 | |
1690 #endif | 1686 #endif |
1691 | 1687 |
1692 ngx_conf_merge_str_value(conf->uwsgi_string, prev->uwsgi_string, ""); | 1688 ngx_conf_merge_str_value(conf->uwsgi_string, prev->uwsgi_string, ""); |
1693 | 1689 |
1694 hash.max_size = 512; | 1690 hash.max_size = 512; |
1700 != NGX_OK) | 1696 != NGX_OK) |
1701 { | 1697 { |
1702 return NGX_CONF_ERROR; | 1698 return NGX_CONF_ERROR; |
1703 } | 1699 } |
1704 | 1700 |
1705 if (conf->upstream.upstream == NULL) { | 1701 if (conf->upstream.upstream == NULL && conf->uwsgi_lengths == NULL) { |
1706 conf->upstream.upstream = prev->upstream.upstream; | 1702 conf->upstream.upstream = prev->upstream.upstream; |
1707 } | 1703 |
1708 | |
1709 if (conf->uwsgi_lengths == NULL) { | |
1710 conf->uwsgi_lengths = prev->uwsgi_lengths; | 1704 conf->uwsgi_lengths = prev->uwsgi_lengths; |
1711 conf->uwsgi_values = prev->uwsgi_values; | 1705 conf->uwsgi_values = prev->uwsgi_values; |
1706 | |
1707 #if (NGX_HTTP_SSL) | |
1708 conf->upstream.ssl = prev->upstream.ssl; | |
1709 #endif | |
1712 } | 1710 } |
1713 | 1711 |
1714 if (conf->upstream.upstream || conf->uwsgi_lengths) { | 1712 if (conf->upstream.upstream || conf->uwsgi_lengths) { |
1715 clcf = ngx_http_conf_get_module_loc_conf(cf, ngx_http_core_module); | 1713 clcf = ngx_http_conf_get_module_loc_conf(cf, ngx_http_core_module); |
1716 if (clcf->handler == NULL && clcf->lmt_excpt) { | 1714 if (clcf->handler == NULL && clcf->lmt_excpt) { |