changeset 1340:32cdba6f2ec1

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 Mon, 23 Jul 2007 12:35:21 +0000
parents 50b6cd5bc2e2
children be2e13691c60
files src/http/ngx_http_upstream.c
diffstat 1 files changed, 6 insertions(+), 0 deletions(-) [+]
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];
     }