From: Ruslan Ermilov Date: Wed, 9 Dec 2015 13:26:59 +0000 (+0300) Subject: Fixed fastcgi_pass with UNIX socket and variables (ticket #855). X-Git-Tag: release-1.9.9~1 X-Git-Url: http://www.kaiwu.me/postgresql/commit/static/gitweb.js?a=commitdiff_plain;h=5e7535df7279a4b13b33913ebbe4fba8b83933f9;p=nginx.git Fixed fastcgi_pass with UNIX socket and variables (ticket #855). This was broken in a93345ee8f52 (1.9.8). --- diff --git a/src/http/ngx_http_upstream.c b/src/http/ngx_http_upstream.c index 78f6e3498..6c6ee8000 100644 --- a/src/http/ngx_http_upstream.c +++ b/src/http/ngx_http_upstream.c @@ -642,7 +642,9 @@ ngx_http_upstream_init_request(ngx_http_request_t *r) if (u->resolved->sockaddr) { - if (u->resolved->port == 0) { + if (u->resolved->port == 0 + && u->resolved->sockaddr->sa_family != AF_UNIX) + { ngx_log_error(NGX_LOG_ERR, r->connection->log, 0, "no port in upstream \"%V\"", host); ngx_http_upstream_finalize_request(r, u,