fix r1913

This commit is contained in:
Igor Sysoev 2008-10-30 15:59:10 +00:00
parent 164abfb26f
commit 694c84975d
3 changed files with 3 additions and 3 deletions

View File

@ -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;
}

View File

@ -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)
{

View File

@ -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;