aboutsummaryrefslogtreecommitdiff
path: root/src/http/modules/ngx_http_fastcgi_module.c
diff options
context:
space:
mode:
authorRuslan Ermilov <ru@nginx.com>2015-11-21 10:44:07 +0300
committerRuslan Ermilov <ru@nginx.com>2015-11-21 10:44:07 +0300
commit72b9a317d2983b3127b8cce21236af8409ff732a (patch)
tree77227aec49ac06df16d3477708e2488bb2421f3d /src/http/modules/ngx_http_fastcgi_module.c
parentcb5306984b3f2eacb155dfee17b1b9e3165c9168 (diff)
downloadnginx-72b9a317d2983b3127b8cce21236af8409ff732a.tar.gz
nginx-72b9a317d2983b3127b8cce21236af8409ff732a.zip
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.
Diffstat (limited to 'src/http/modules/ngx_http_fastcgi_module.c')
-rw-r--r--src/http/modules/ngx_http_fastcgi_module.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/http/modules/ngx_http_fastcgi_module.c b/src/http/modules/ngx_http_fastcgi_module.c
index 668719fe5..dbd7767f0 100644
--- a/src/http/modules/ngx_http_fastcgi_module.c
+++ b/src/http/modules/ngx_http_fastcgi_module.c
@@ -773,10 +773,11 @@ ngx_http_fastcgi_eval(ngx_http_request_t *r, ngx_http_fastcgi_loc_conf_t *flcf)
} else {
u->resolved->host = url.host;
- u->resolved->port = url.port;
- u->resolved->no_port = url.no_port;
}
+ u->resolved->port = url.port;
+ u->resolved->no_port = url.no_port;
+
return NGX_OK;
}