changeset 604:611ebd77621d NGINX_0_8_54

nginx 0.8.54 *) Bugfix: if there was a single server for given IPv6 address:port pair, then captures in regular expressions in a "server_name" directive did not work. *) Bugfix: a segmentation fault might occur in a worker process, if the "auth_basic" directive was used. Thanks to Michail Laletin. *) Bugfix: compatibility with ngx_http_eval_module; the bug had appeared in 0.8.42.
author Igor Sysoev <http://sysoev.ru>
date Tue, 14 Dec 2010 00:00:00 +0300
parents 94ea26a3b3aa
children cb7a8af637d0
files CHANGES CHANGES.ru src/core/nginx.h src/http/modules/perl/nginx.pm src/http/ngx_http.c src/http/ngx_http_core_module.c src/os/unix/ngx_user.c
diffstat 7 files changed, 49 insertions(+), 13 deletions(-) [+]
line wrap: on
line diff
--- a/CHANGES	Mon Oct 18 00:00:00 2010 +0400
+++ b/CHANGES	Tue Dec 14 00:00:00 2010 +0300
@@ -1,4 +1,18 @@
 
+Changes with nginx 0.8.54                                        14 Dec 2010
+
+    *) Bugfix: if there was a single server for given IPv6 address:port 
+       pair, then captures in regular expressions in a "server_name" 
+       directive did not work.
+
+    *) Bugfix: a segmentation fault might occur in a worker process, if the 
+       "auth_basic" directive was used.
+       Thanks to Michail Laletin.
+
+    *) Bugfix: compatibility with ngx_http_eval_module; the bug had 
+       appeared in 0.8.42.
+
+
 Changes with nginx 0.8.53                                        18 Oct 2010
 
     *) Feature: now the "error_page" directive allows to change a status 
@@ -1204,7 +1218,7 @@
 
     *) Bugfix: the "try_files" directive might test incorrectly directories.
 
-    *) Bugfix: if there is the single server for given address:port pair, 
+    *) Bugfix: if there was a single server for given address:port pair, 
        then captures in regular expressions in a "server_name" directive 
        did not work.
 
@@ -1558,7 +1572,7 @@
     *) Bugfix: the "http_503" parameter of the "proxy_next_upstream" or 
        "fastcgi_next_upstream" directives did not work.
 
-    *) Bugfix: nginx might send a "Transfer-Encoding: chunked" heaer line 
+    *) Bugfix: nginx might send a "Transfer-Encoding: chunked" header line 
        for HEAD requests.
 
     *) Bugfix: now accept threshold depends on worker_connections.
--- a/CHANGES.ru	Mon Oct 18 00:00:00 2010 +0400
+++ b/CHANGES.ru	Tue Dec 14 00:00:00 2010 +0300
@@ -1,4 +1,18 @@
 
+Изменения в nginx 0.8.54                                          14.12.2010
+
+    *) Исправление: если для пары IPv6-адрес:порт описан только один 
+       сервер, то выделения в регулярных выражениях в директиве server_name 
+       не работали.
+
+    *) Исправление: при использовании директивы auth_basic в рабочем 
+       процессе мог произойти segmentation fault.
+       Спасибо Михаилу Лалетину.
+
+    *) Исправление: совместимость с модулем ngx_http_eval_module; ошибка 
+       появилась в 0.8.42.
+
+
 Изменения в nginx 0.8.53                                          18.10.2010
 
     *) Добавление: теперь директива error_page позволяет менять код статуса 
@@ -7,7 +21,7 @@
     *) Добавление: директива gzip_disable поддерживает специальную маску 
        degradation.
 
-    *) Исправление: при использовании файлового AIO, могла происходить 
+    *) Исправление: при использовании файлового AIO могла происходить 
        утечка сокетов.
        Спасибо Максиму Дунину.
 
--- a/src/core/nginx.h	Mon Oct 18 00:00:00 2010 +0400
+++ b/src/core/nginx.h	Tue Dec 14 00:00:00 2010 +0300
@@ -8,8 +8,8 @@
 #define _NGINX_H_INCLUDED_
 
 
-#define nginx_version         8053
-#define NGINX_VERSION      "0.8.53"
+#define nginx_version         8054
+#define NGINX_VERSION      "0.8.54"
 #define NGINX_VER          "nginx/" NGINX_VERSION
 
 #define NGINX_VAR          "NGINX"
--- a/src/http/modules/perl/nginx.pm	Mon Oct 18 00:00:00 2010 +0400
+++ b/src/http/modules/perl/nginx.pm	Tue Dec 14 00:00:00 2010 +0300
@@ -48,7 +48,7 @@
     HTTP_INSUFFICIENT_STORAGE
 );
 
-our $VERSION = '0.8.53';
+our $VERSION = '0.8.54';
 
 require XSLoader;
 XSLoader::load('nginx', $VERSION);
--- a/src/http/ngx_http.c	Mon Oct 18 00:00:00 2010 +0400
+++ b/src/http/ngx_http.c	Tue Dec 14 00:00:00 2010 +0300
@@ -1870,8 +1870,12 @@
         if (addr[i].hash.buckets == NULL
             && (addr[i].wc_head == NULL
                 || addr[i].wc_head->hash.buckets == NULL)
-            && (addr[i].wc_head == NULL
-                || addr[i].wc_head->hash.buckets == NULL))
+            && (addr[i].wc_tail == NULL
+                || addr[i].wc_tail->hash.buckets == NULL)
+#if (NGX_PCRE)
+            && addr[i].nregex == 0
+#endif
+            )
         {
             continue;
         }
--- a/src/http/ngx_http_core_module.c	Mon Oct 18 00:00:00 2010 +0400
+++ b/src/http/ngx_http_core_module.c	Tue Dec 14 00:00:00 2010 +0300
@@ -910,7 +910,11 @@
         return NGX_AGAIN;
     }
 
-    /* rc == NGX_OK || rc == NGX_ERROR || rc == NGX_HTTP_...  */
+    if (rc == NGX_DONE) {
+        return NGX_OK;
+    }
+
+    /* NGX_OK, NGX_AGAIN, NGX_ERROR, NGX_HTTP_...  */
 
     ngx_http_finalize_request(r, rc);
 
--- a/src/os/unix/ngx_user.c	Mon Oct 18 00:00:00 2010 +0400
+++ b/src/os/unix/ngx_user.c	Tue Dec 14 00:00:00 2010 +0300
@@ -41,11 +41,11 @@
     err = ngx_errno;
 
     if (err == 0) {
-        len = ngx_strlen(value);
+        len = ngx_strlen(value) + 1;
 
         *encrypted = ngx_pnalloc(pool, len);
         if (*encrypted) {
-            ngx_memcpy(*encrypted, value, len + 1);
+            ngx_memcpy(*encrypted, value, len);
             return NGX_OK;
         }
     }
@@ -79,11 +79,11 @@
     value = crypt((char *) key, (char *) salt);
 
     if (value) {
-        len = ngx_strlen(value);
+        len = ngx_strlen(value) + 1;
 
         *encrypted = ngx_pnalloc(pool, len);
         if (*encrypted) {
-            ngx_memcpy(*encrypted, value, len + 1);
+            ngx_memcpy(*encrypted, value, len);
         }
 
 #if (NGX_THREADS && NGX_NONREENTRANT_CRYPT)