From 694c84975dd097f60239b4cbd8c06af29f4140c0 Mon Sep 17 00:00:00 2001 From: Igor Sysoev Date: Thu, 30 Oct 2008 15:59:10 +0000 Subject: [PATCH] fix r1913 --- src/http/modules/ngx_http_proxy_module.c | 2 +- src/http/ngx_http_upstream.c | 2 +- src/http/ngx_http_upstream.h | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/http/modules/ngx_http_proxy_module.c b/src/http/modules/ngx_http_proxy_module.c index 83784eac7..5e98ad9d4 100644 --- a/src/http/modules/ngx_http_proxy_module.c +++ b/src/http/modules/ngx_http_proxy_module.c @@ -616,7 +616,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; + r->upstream->resolved->no_port = u.no_port; return NGX_OK; } diff --git a/src/http/ngx_http_upstream.c b/src/http/ngx_http_upstream.c index 9144913be..c3fc8612c 100644 --- a/src/http/ngx_http_upstream.c +++ b/src/http/ngx_http_upstream.c @@ -405,7 +405,7 @@ ngx_http_upstream_init(ngx_http_request_t *r) uscf = uscfp[i]; if (uscf->host.len == host->len - && ((uscf->port == 0 && u->resolved->default_port) + && ((uscf->port == 0 && u->resolved->no_port) || uscf->port == u->resolved->port) && ngx_memcmp(uscf->host.data, host->data, host->len) == 0) { diff --git a/src/http/ngx_http_upstream.h b/src/http/ngx_http_upstream.h index dd72ba86d..c87bcdc57 100644 --- a/src/http/ngx_http_upstream.h +++ b/src/http/ngx_http_upstream.h @@ -209,7 +209,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 no_port; /* unsigned no_port:1 */ ngx_uint_t naddrs; in_addr_t *addrs; ngx_resolver_ctx_t *ctx;