]> git.kaiwu.me - nginx.git/commit
Upstream: consistently initialize explicit upstreams.
authorRuslan Ermilov <ru@nginx.com>
Mon, 17 Oct 2016 11:14:02 +0000 (14:14 +0300)
committerRuslan Ermilov <ru@nginx.com>
Mon, 17 Oct 2016 11:14:02 +0000 (14:14 +0300)
commit1f5d97cbf0005f7c8c6f15888ea5c36318da920a
treea0a7e85439bd5553433f78b4e2defac5d6d60960
parent149fda55f730c38fb9e2c5b63370da92c0ad7c22
Upstream: consistently initialize explicit upstreams.

When an upstream{} block follows a proxy_pass reference to it,
such an upstream inherited port and default_port settings from
proxy_pass.  This was different from when they came in another
order (see ticket #1059).  Explicit upstreams should not have
port and default_port in any case.

This fixes the following case:

server { location / { proxy_pass http://u; } ... }
upstream u { server 127.0.0.1; }
server { location / { proxy_pass https://u; } ... }

but not the following:

server { location / { proxy_pass http://u; } ... }
server { location / { proxy_pass https://u; } ... }
upstream u { server 127.0.0.1; }
src/http/ngx_http_upstream.c