fix case when two directives

proxy_pass   http://backend;
    proxy_pass   https://backend;
both use one port - 80 or 443, that was defined first.
This commit is contained in:
Igor Sysoev 2007-07-23 12:35:21 +00:00
parent 5bb2112c27
commit 32b787560a

View 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];
}