]> git.kaiwu.me - nginx.git/commitdiff
fix case when two directives
authorIgor Sysoev <igor@sysoev.ru>
Mon, 23 Jul 2007 12:35:21 +0000 (12:35 +0000)
committerIgor Sysoev <igor@sysoev.ru>
Mon, 23 Jul 2007 12:35:21 +0000 (12:35 +0000)
    proxy_pass   http://backend;
    proxy_pass   https://backend;
both use one port - 80 or 443, that was defined first.

src/http/ngx_http_upstream.c

index 376b85fcd8cb0f686259e1b5567303c3c343828c..bc4567458dd679e80b82714e9590437ac628642b 100644 (file)
@@ -3209,6 +3209,12 @@ ngx_http_upstream_add(ngx_conf_t *cf, ngx_url_t *u, ngx_uint_t flags)
             continue;
         }
 
+        if (uscfp[i]->default_port && u->default_port
+            && uscfp[i]->default_port != u->default_port)
+        {
+            continue;
+        }
+
         return uscfp[i];
     }