[nginx] Fixed fastcgi_pass with UNIX socket and variables (ticke...

Ruslan Ermilov ru at nginx.com
Wed Dec 9 13:28:04 UTC 2015


details:   http://hg.nginx.org/nginx/rev/705c356ce664
branches:  
changeset: 6326:705c356ce664
user:      Ruslan Ermilov <ru at nginx.com>
date:      Wed Dec 09 16:26:59 2015 +0300
description:
Fixed fastcgi_pass with UNIX socket and variables (ticket #855).

This was broken in a93345ee8f52 (1.9.8).

diffstat:

 src/http/ngx_http_upstream.c |  4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diffs (14 lines):

diff -r 00079605a9b8 -r 705c356ce664 src/http/ngx_http_upstream.c
--- a/src/http/ngx_http_upstream.c	Wed Dec 09 14:41:16 2015 +0300
+++ b/src/http/ngx_http_upstream.c	Wed Dec 09 16:26:59 2015 +0300
@@ -642,7 +642,9 @@ ngx_http_upstream_init_request(ngx_http_
 
         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,



More information about the nginx-devel mailing list