diff src/http/ngx_http_upstream.c @ 1504:840b81d13a2f stable-0.5

r1340, r1341 merge: fix case when two directives proxy_pass http://backend; proxy_pass https://backend; both use one port - 80 or 443, that was defined first.
author Igor Sysoev <igor@sysoev.ru>
date Sat, 22 Sep 2007 18:44:30 +0000
parents d59617e7e6a1
children d450e57ea5a4
line wrap: on
line diff
--- a/src/http/ngx_http_upstream.c
+++ b/src/http/ngx_http_upstream.c
@@ -3209,6 +3209,12 @@ ngx_http_upstream_add(ngx_conf_t *cf, ng
             continue;
         }
 
+        if (uscfp[i]->default_port && u->default_port
+            && uscfp[i]->default_port != u->default_port)
+        {
+            continue;
+        }
+
         return uscfp[i];
     }