changeset 2278:4a878cbad757

fix server_addr value known from configuration, bug introduced in r2199
author Igor Sysoev <igor@sysoev.ru>
date Fri, 17 Oct 2008 12:36:48 +0000
parents 732bf367dc08
children bbb17a60ec44
files src/http/ngx_http_core_module.c
diffstat 1 files changed, 4 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/http/ngx_http_core_module.c	Thu Oct 16 13:31:00 2008 +0000
+++ b/src/http/ngx_http_core_module.c	Fri Oct 17 12:36:48 2008 +0000
@@ -1631,6 +1631,10 @@
         }
 
         r->in_addr = sin.sin_addr.s_addr;
+
+    } else {
+        sin.sin_family = c->sockaddr->sa_family;
+        sin.sin_addr.s_addr = r->in_addr;
     }
 
     if (s == NULL) {