From: Igor Sysoev Date: Wed, 31 Mar 2010 13:30:50 +0000 (+0000) Subject: do not add a port in redirect if we listen on unix domain socket X-Git-Tag: release-0.8.35~6 X-Git-Url: http://www.kaiwu.me/postgresql/commit/static/gitweb.js?a=commitdiff_plain;h=569f95818b69792cd1cd36a98f0b54b8dd2c067e;p=nginx.git do not add a port in redirect if we listen on unix domain socket --- diff --git a/src/http/ngx_http_header_filter_module.c b/src/http/ngx_http_header_filter_module.c index ef1791107..4f4023632 100644 --- a/src/http/ngx_http_header_filter_module.c +++ b/src/http/ngx_http_header_filter_module.c @@ -337,6 +337,11 @@ ngx_http_header_filter(ngx_http_request_t *r) sin6 = (struct sockaddr_in6 *) c->local_sockaddr; port = ntohs(sin6->sin6_port); break; +#endif +#if (NGX_HAVE_UNIX_DOMAIN) + case AF_UNIX: + port = 0; + break; #endif default: /* AF_INET */ sin = (struct sockaddr_in *) c->local_sockaddr;