From: Igor Sysoev Date: Mon, 23 Jul 2007 12:35:21 +0000 (+0000) Subject: fix case when two directives X-Git-Tag: release-0.6.6~9 X-Git-Url: http://git.kaiwu.me/sitemap.xml?a=commitdiff_plain;h=32b787560ac2d7bd4b15fe2d8d6a4786e00b96e3;p=nginx.git fix case when two directives proxy_pass http://backend; proxy_pass https://backend; both use one port - 80 or 443, that was defined first. --- diff --git a/src/http/ngx_http_upstream.c b/src/http/ngx_http_upstream.c index 376b85fcd..bc4567458 100644 --- 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, 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]; }