]> git.kaiwu.me - nginx.git/commit
Upstream: added the ngx_http_upstream_resolved_t.name field.
authorRuslan Ermilov <ru@nginx.com>
Mon, 31 Oct 2016 15:33:33 +0000 (18:33 +0300)
committerRuslan Ermilov <ru@nginx.com>
Mon, 31 Oct 2016 15:33:33 +0000 (18:33 +0300)
commit3fae83a91c6e5cda012adf6ee2783273e747f613
tree596b04769dc04ba8719d14c93516c089b8a282b0
parent4e1720b0a21c6f8ad9f459630e270372387207ba
Upstream: added the ngx_http_upstream_resolved_t.name field.

This fixes inconsistency in what is stored in the "host" field.
Normally it would contain the "host" part of the parsed URL
(e.g., proxy_pass with variables), but for the case of an
implicit upstream specified with literal address it contained
the text representation of the socket address (that is, host
including port for IP).

Now the "host" field always contains the "host" part of the URL,
while the text representation of the socket address is stored
in the newly added "name" field.

The ngx_http_upstream_create_round_robin_peer() function was
modified accordingly in a way to be compatible with the code
that does not know about the new "name" field.

The "stream" code was similarly modified except for not adding
compatibility in ngx_stream_upstream_create_round_robin_peer().

This change is also a prerequisite for the next change.
src/http/modules/ngx_http_fastcgi_module.c
src/http/modules/ngx_http_proxy_module.c
src/http/modules/ngx_http_scgi_module.c
src/http/modules/ngx_http_uwsgi_module.c
src/http/ngx_http_upstream.h
src/http/ngx_http_upstream_round_robin.c
src/stream/ngx_stream_proxy_module.c
src/stream/ngx_stream_upstream.h
src/stream/ngx_stream_upstream_round_robin.c