diff src/http/ngx_http_upstream.c @ 264:4de4f8bc5d07 NGINX_0_5_2

nginx 0.5.2 *) Bugfix: if the "proxy_pass" directive used the name of the "upstream" block, then nginx tried to resolve the name; bug appeared in 0.5.1.
author Igor Sysoev <http://sysoev.ru>
date Mon, 11 Dec 2006 00:00:00 +0300
parents e0b1d0a6c629
children 251bcd11a5b8
line wrap: on
line diff
--- 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)