Mercurial > hg > nginx
changeset 6703:edcd9303a4d3
Upstream: introduced u->upstream.
It holds upstream{} block configuration, including ones selected via
run-time lookup using variables.
author | Maxim Dounin <mdounin@mdounin.ru> |
---|---|
date | Thu, 22 Sep 2016 19:32:26 +0300 |
parents | 914d8a63dbad |
children | a44ba757851d |
files | src/http/ngx_http_upstream.c src/http/ngx_http_upstream.h src/stream/ngx_stream_proxy_module.c src/stream/ngx_stream_upstream.h |
diffstat | 4 files changed, 6 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/src/http/ngx_http_upstream.c Thu Sep 22 19:31:08 2016 +0300 +++ b/src/http/ngx_http_upstream.c Thu Sep 22 19:32:26 2016 +0300 @@ -748,6 +748,8 @@ return; } + u->upstream = uscf; + #if (NGX_HTTP_SSL) u->ssl_name = uscf->host; #endif
--- a/src/http/ngx_http_upstream.h Thu Sep 22 19:31:08 2016 +0300 +++ b/src/http/ngx_http_upstream.h Thu Sep 22 19:32:26 2016 +0300 @@ -313,6 +313,7 @@ ngx_chain_writer_ctx_t writer; ngx_http_upstream_conf_t *conf; + ngx_http_upstream_srv_conf_t *upstream; #if (NGX_HTTP_CACHE) ngx_array_t *caches; #endif
--- a/src/stream/ngx_stream_proxy_module.c Thu Sep 22 19:31:08 2016 +0300 +++ b/src/stream/ngx_stream_proxy_module.c Thu Sep 22 19:32:26 2016 +0300 @@ -521,6 +521,8 @@ return; } + u->upstream = uscf; + #if (NGX_STREAM_SSL) u->ssl_name = uscf->host; #endif
--- a/src/stream/ngx_stream_upstream.h Thu Sep 22 19:31:08 2016 +0300 +++ b/src/stream/ngx_stream_upstream.h Thu Sep 22 19:32:26 2016 +0300 @@ -124,6 +124,7 @@ ngx_str_t ssl_name; #endif + ngx_stream_upstream_srv_conf_t *upstream; ngx_stream_upstream_resolved_t *resolved; ngx_stream_upstream_state_t *state; unsigned connected:1;