# HG changeset patch # User Igor Sysoev # Date 1165849927 0 # Node ID cc4273a2597e7ba6955a4cacb22f183f9ad5d970 # Parent 7cd557624b0449670df44265b2bf2995600d2d06 upstream name was tried to resolve diff --git a/src/http/ngx_http_upstream.c b/src/http/ngx_http_upstream.c --- a/src/http/ngx_http_upstream.c +++ b/src/http/ngx_http_upstream.c @@ -2843,7 +2843,7 @@ ngx_http_upstream_add(ngx_conf_t *cf, ng uscfp = umcf->upstreams.elts; for (i = 0; i < umcf->upstreams.nelts; i++) { - if (uscfp[i]->port != u->portn + if ((uscfp[i]->port && uscfp[i]->port != u->portn) || uscfp[i]->host.len != u->host.len || ngx_strncasecmp(uscfp[i]->host.data, u->host.data, u->host.len) != 0)