0.7.19 && $server_addr

Igor Sysoev is at rambler-co.ru
Fri Oct 17 16:02:50 MSD 2008


On Fri, Oct 17, 2008 at 02:20:31PM +0300, Vladimir Yeshchenko wrote:

> Собрал 0.7.19 в FreeBSD 6.2-RELEASE-p9.
> Что-то не то с переменной $server_addr или я не умею ее использовать.
> 1. в логе вместо $server_addr пусто.
> 2. в заголовке X-Proxy-IP тоже пусто.

Эта ошибка появилась в 0.7.12. Патч прилагается.


-- 
Игорь Сысоев
http://sysoev.ru
-------------- next part --------------
Index: src/http/ngx_http_core_module.c
===================================================================
--- src/http/ngx_http_core_module.c	(revision 1597)
+++ src/http/ngx_http_core_module.c	(working copy)
@@ -1631,6 +1631,10 @@
         }
 
         r->in_addr = sin.sin_addr.s_addr;
+
+    } else {
+        sin.sin_family = AF_INET;
+        sin.sin_addr.s_addr = r->in_addr;
     }
 
     if (s == NULL) {


More information about the nginx-ru mailing list