changeset 450:20962db0117c NGINX_0_7_37

nginx 0.7.37 *) Bugfix: directive using upstreams did not work; the bug had appeared in 0.7.36.
author Igor Sysoev <http://sysoev.ru>
date Sat, 21 Feb 2009 00:00:00 +0300
parents 32d6e4e48a3a
children 56fe58e64760
files CHANGES CHANGES.ru src/core/nginx.h src/core/ngx_inet.c src/http/modules/perl/nginx.pm src/http/ngx_http_core_module.c
diffstat 6 files changed, 21 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/CHANGES	Sat Feb 21 00:00:00 2009 +0300
+++ b/CHANGES	Sat Feb 21 00:00:00 2009 +0300
@@ -1,4 +1,10 @@
 
+Changes with nginx 0.7.37                                        21 Feb 2009
+
+    *) Bugfix: directive using upstreams did not work; the bug had appeared 
+       in 0.7.36.
+
+
 Changes with nginx 0.7.36                                        21 Feb 2009
 
     *) Feature: a preliminary IPv6 support; the "listen" directive of the 
--- a/CHANGES.ru	Sat Feb 21 00:00:00 2009 +0300
+++ b/CHANGES.ru	Sat Feb 21 00:00:00 2009 +0300
@@ -1,4 +1,10 @@
 
+Изменения в nginx 0.7.37                                          21.02.2009
+
+    *) Исправление: директивы, использующие upstream'ы, не работали; ошибка 
+       появилась в 0.7.36.
+
+
 Изменения в nginx 0.7.36                                          21.02.2009
 
     *) Добавление: предварительная поддержка IPv6; директива listen модуля 
--- a/src/core/nginx.h	Sat Feb 21 00:00:00 2009 +0300
+++ b/src/core/nginx.h	Sat Feb 21 00:00:00 2009 +0300
@@ -8,7 +8,7 @@
 #define _NGINX_H_INCLUDED_
 
 
-#define NGINX_VERSION      "0.7.36"
+#define NGINX_VERSION      "0.7.37"
 #define NGINX_VER          "nginx/" NGINX_VERSION
 
 #define NGINX_VAR          "NGINX"
--- a/src/core/ngx_inet.c	Sat Feb 21 00:00:00 2009 +0300
+++ b/src/core/ngx_inet.c	Sat Feb 21 00:00:00 2009 +0300
@@ -704,8 +704,7 @@
 
     /* AF_INET only */
 
-    sin = (struct sockaddr_in *) &u->sockaddr;
-    port = sin->sin_port;
+    port = htons(u->port);
 
     in_addr = inet_addr((char *) host);
 
--- a/src/http/modules/perl/nginx.pm	Sat Feb 21 00:00:00 2009 +0300
+++ b/src/http/modules/perl/nginx.pm	Sat Feb 21 00:00:00 2009 +0300
@@ -47,7 +47,7 @@
     HTTP_INSUFFICIENT_STORAGE
 );
 
-our $VERSION = '0.7.36';
+our $VERSION = '0.7.37';
 
 require XSLoader;
 XSLoader::load('nginx', $VERSION);
--- a/src/http/ngx_http_core_module.c	Sat Feb 21 00:00:00 2009 +0300
+++ b/src/http/ngx_http_core_module.c	Sat Feb 21 00:00:00 2009 +0300
@@ -2790,9 +2790,15 @@
 #endif
         sin->sin_addr.s_addr = INADDR_ANY;
 
+        ls->socklen = sizeof(struct sockaddr_in);
+
         ls->conf.backlog = NGX_LISTEN_BACKLOG;
         ls->conf.rcvbuf = -1;
         ls->conf.sndbuf = -1;
+        ls->conf.wildcard = 1;
+
+        (void) ngx_sock_ntop((struct sockaddr *) &ls->sockaddr, ls->conf.addr,
+                             NGX_SOCKADDR_STRLEN, 1);
     }
 
     if (conf->server_name.data == NULL) {