diff src/http/ngx_http_request.c @ 501:98143f74eb3d NGINX_0_7_58

nginx 0.7.58 *) Feature: a "listen" directive of the mail proxy module supports IPv6. *) Feature: the "image_filter_jpeg_quality" directive. *) Feature: the "client_body_in_single_buffer" directive. *) Feature: the $request_body variable. *) Bugfix: in ngx_http_autoindex_module in file name links having a ":" symbol in the name. *) Bugfix: "make upgrade" procedure did not work; the bug had appeared in 0.7.53. Thanks to Denis F. Latypoff.
author Igor Sysoev <http://sysoev.ru>
date Mon, 18 May 2009 00:00:00 +0400
parents 829f9a66a659
children 499474178a11
line wrap: on
line diff
--- a/src/http/ngx_http_request.c
+++ b/src/http/ngx_http_request.c
@@ -310,7 +310,7 @@ ngx_http_init_request(ngx_event_t *rev)
          * is required to determine a server address
          */
 
-        if (ngx_http_server_addr(r, NULL) != NGX_OK) {
+        if (ngx_connection_local_sockaddr(c, NULL, 0) != NGX_OK) {
             ngx_http_close_connection(c);
             return;
         }
@@ -321,7 +321,7 @@ ngx_http_init_request(ngx_event_t *rev)
         case AF_INET6:
             sin6 = (struct sockaddr_in6 *) c->local_sockaddr;
 
-            addr6 = (ngx_http_in6_addr_t *) port->addrs;
+            addr6 = port->addrs;
 
             /* the last address is "*" */
 
@@ -360,7 +360,7 @@ ngx_http_init_request(ngx_event_t *rev)
 
 #if (NGX_HAVE_INET6)
         case AF_INET6:
-            addr6 = (ngx_http_in6_addr_t *) port->addrs;
+            addr6 = port->addrs;
             addr_conf = &addr6[0].conf;
             break;
 #endif