fix r1903
diff --git a/src/http/ngx_http_upstream.c b/src/http/ngx_http_upstream.c
index a46b819..2412779 100644
--- a/src/http/ngx_http_upstream.c
+++ b/src/http/ngx_http_upstream.c
@@ -392,7 +392,8 @@
             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;