[PATCH] Core: fix fake ports in redirects on unix sockets
Maxim Dounin
mdounin at mdounin.ru
Fri Feb 19 23:36:46 MSK 2010
# HG changeset patch
# User Maxim Dounin <mdounin at mdounin.ru>
# Date 1266611793 -10800
# Node ID 0f0a551e29c08abf4a01d255be44e421d581f7b7
# Parent 66adffc35a4699210362cfa10a2c279732861f41
Core: fix fake ports in redirects on unix sockets.
diff --git a/src/http/ngx_http_header_filter_module.c b/src/http/ngx_http_header_filter_module.c
--- a/src/http/ngx_http_header_filter_module.c
+++ b/src/http/ngx_http_header_filter_module.c
@@ -342,6 +342,11 @@ ngx_http_header_filter(ngx_http_request_
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);
More information about the nginx-devel
mailing list