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 87f9fc6094
commit c89fce22ce
1 changed files with 6 additions and 0 deletions

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