Mercurial > hg > nginx
changeset 1504:840b81d13a2f stable-0.5
r1340, r1341 merge:
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 | Sat, 22 Sep 2007 18:44:30 +0000 |
parents | fa67e7914b70 |
children | f552535e259b |
files | src/http/modules/ngx_http_proxy_module.c src/http/ngx_http_upstream.c |
diffstat | 2 files changed, 7 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/src/http/modules/ngx_http_proxy_module.c Sat Sep 22 18:41:35 2007 +0000 +++ b/src/http/modules/ngx_http_proxy_module.c Sat Sep 22 18:44:30 2007 +0000 @@ -2237,6 +2237,7 @@ if (port == 80) { plcf->port.len = sizeof("80") - 1; plcf->port.data = (u_char *) "80"; + } else { plcf->port.len = sizeof("443") - 1; plcf->port.data = (u_char *) "443";
--- a/src/http/ngx_http_upstream.c Sat Sep 22 18:41:35 2007 +0000 +++ b/src/http/ngx_http_upstream.c Sat Sep 22 18:44:30 2007 +0000 @@ -3209,6 +3209,12 @@ continue; } + if (uscfp[i]->default_port && u->default_port + && uscfp[i]->default_port != u->default_port) + { + continue; + } + return uscfp[i]; }