mirror of
https://github.com/nginx/nginx.git
synced 2025-06-10 19:42:39 +08:00
fix r1903
This commit is contained in:
parent
85d6a3e3db
commit
8efe926dc5
@ -611,6 +611,7 @@ ngx_http_proxy_eval(ngx_http_request_t *r, ngx_http_proxy_ctx_t *ctx,
|
||||
r->upstream->resolved->host = u.host;
|
||||
r->upstream->resolved->port = (in_port_t) (u.no_port ? u.default_port:
|
||||
u.port);
|
||||
r->upstream->resolved->default_port = u.default_port;
|
||||
|
||||
return NGX_OK;
|
||||
}
|
||||
|
@ -392,7 +392,8 @@ ngx_http_upstream_init(ngx_http_request_t *r)
|
||||
uscf = uscfp[i];
|
||||
|
||||
if (uscf->host.len == host->len
|
||||
&& uscf->port == u->resolved->port
|
||||
&& ((uscf->port == 0 && u->resolved->default_port)
|
||||
|| uscf->port == u->resolved->port)
|
||||
&& ngx_memcmp(uscf->host.data, host->data, host->len) == 0)
|
||||
{
|
||||
goto found;
|
||||
|
@ -201,6 +201,7 @@ typedef struct {
|
||||
typedef struct {
|
||||
ngx_str_t host;
|
||||
in_port_t port;
|
||||
ngx_uint_t default_port; /* unsigned default_port:1 */
|
||||
ngx_uint_t naddrs;
|
||||
in_addr_t *addrs;
|
||||
ngx_resolver_ctx_t *ctx;
|
||||
|
Loading…
Reference in New Issue
Block a user