Mercurial > hg > nginx
comparison src/http/modules/ngx_http_proxy_module.c @ 6303:a93345ee8f52
Upstream: fixed "no port" detection in evaluated upstreams.
If an upstream with variables evaluated to address without a port,
then instead of a "no port in upstream" error an attempt was made
to connect() which failed with EADDRNOTAVAIL.
author | Ruslan Ermilov <ru@nginx.com> |
---|---|
date | Sat, 21 Nov 2015 10:44:07 +0300 |
parents | 4d5ac1a31d44 |
children | 44122bddd9a1 |
comparison
equal
deleted
inserted
replaced
6302:bec5b3093337 | 6303:a93345ee8f52 |
---|---|
1013 u->resolved->naddrs = 1; | 1013 u->resolved->naddrs = 1; |
1014 u->resolved->host = url.addrs[0].name; | 1014 u->resolved->host = url.addrs[0].name; |
1015 | 1015 |
1016 } else { | 1016 } else { |
1017 u->resolved->host = url.host; | 1017 u->resolved->host = url.host; |
1018 u->resolved->port = (in_port_t) (url.no_port ? port : url.port); | 1018 } |
1019 u->resolved->no_port = url.no_port; | 1019 |
1020 } | 1020 u->resolved->port = (in_port_t) (url.no_port ? port : url.port); |
1021 u->resolved->no_port = url.no_port; | |
1021 | 1022 |
1022 return NGX_OK; | 1023 return NGX_OK; |
1023 } | 1024 } |
1024 | 1025 |
1025 | 1026 |