fix r2530
diff --git a/src/http/ngx_http_header_filter_module.c b/src/http/ngx_http_header_filter_module.c
index 0a56154..f2548eb 100644
--- a/src/http/ngx_http_header_filter_module.c
+++ b/src/http/ngx_http_header_filter_module.c
@@ -309,12 +309,12 @@
 #if (NGX_HAVE_INET6)
         case AF_INET6:
             sin6 = (struct sockaddr_in6 *) c->local_sockaddr;
-            port = sin6->sin6_port;
+            port = ntohs(sin6->sin6_port);
             break;
 #endif
         default: /* AF_INET */
             sin = (struct sockaddr_in *) c->local_sockaddr;
-            port = sin->sin_port;
+            port = ntohs(sin->sin_port);
             break;
         }