aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorIgor Sysoev <igor@sysoev.ru>2010-03-31 13:30:50 +0000
committerIgor Sysoev <igor@sysoev.ru>2010-03-31 13:30:50 +0000
commit569f95818b69792cd1cd36a98f0b54b8dd2c067e (patch)
tree5fff47e39196a777894ad2d20c47aa0743120af5 /src
parenta40c395fe969bcda9617816f227df42c8923b811 (diff)
downloadnginx-569f95818b69792cd1cd36a98f0b54b8dd2c067e.tar.gz
nginx-569f95818b69792cd1cd36a98f0b54b8dd2c067e.zip
do not add a port in redirect if we listen on unix domain socket
Diffstat (limited to 'src')
-rw-r--r--src/http/ngx_http_header_filter_module.c5
1 files changed, 5 insertions, 0 deletions
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
@@ -338,6 +338,11 @@ ngx_http_header_filter(ngx_http_request_t *r)
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;
port = ntohs(sin->sin_port);