]> git.kaiwu.me - nginx.git/commitdiff
fix r2530
authorIgor Sysoev <igor@sysoev.ru>
Tue, 24 Feb 2009 07:12:39 +0000 (07:12 +0000)
committerIgor Sysoev <igor@sysoev.ru>
Tue, 24 Feb 2009 07:12:39 +0000 (07:12 +0000)
src/http/ngx_http_header_filter_module.c

index 0a56154750c70ee9422c9c96d91bc271690a3c8c..f2548ebb155e5fb2c3e66bef92069b15dac6b0f6 100644 (file)
@@ -309,12 +309,12 @@ ngx_http_header_filter(ngx_http_request_t *r)
 #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;
         }