changeset 242:ff906029dd40 NGINX_0_4_6

nginx 0.4.6 *) Bugfix: nginx did not run on 64-bit platforms except amd64, sparc64, and ppc64. *) Bugfix: nginx sent the chunked response for HTTP/1.1 request, if its length was set by text string in the $r->headers_out("Content-Length", ...) method. *) Bugfix: after redirecting error by an "error_page" directive any ngx_http_rewrite_module directive returned this error code; bug appeared in 0.4.4.
author Igor Sysoev <http://sysoev.ru>
date Fri, 06 Oct 2006 00:00:00 +0400
parents c3cf292cce38
children d371c9d33781
files CHANGES CHANGES.ru auto/cc/gcc auto/cc/sunc auto/lib/perl/make auto/os/conf src/core/nginx.c src/core/nginx.h src/core/ngx_hash.c src/http/modules/ngx_http_rewrite_module.c src/http/modules/perl/nginx.xs src/http/ngx_http_variables.c
diffstat 12 files changed, 60 insertions(+), 15 deletions(-) [+]
line wrap: on
line diff
--- a/CHANGES	Mon Oct 02 00:00:00 2006 +0400
+++ b/CHANGES	Fri Oct 06 00:00:00 2006 +0400
@@ -1,7 +1,27 @@
 
+Changes with nginx 0.4.6                                         06 Oct 2006
+
+    *) Bugfix: nginx did not run on 64-bit platforms except amd64, sparc64, 
+       and ppc64.
+
+    *) Bugfix: nginx sent the chunked response for HTTP/1.1 request,
+       if its length was set by text string in the 
+       $r->headers_out("Content-Length", ...) method.
+
+    *) Bugfix: after redirecting error by an "error_page" directive any 
+       ngx_http_rewrite_module directive returned this error code; bug 
+       appeared in 0.4.4.
+
+
+Changes with nginx 0.4.5                                         02 Oct 2006
+
+    *) Bugfix: nginx could not be built on Linux and Solaris; bug appeared 
+       in 0.4.4.
+
+
 Changes with nginx 0.4.4                                         02 Oct 2006
 
-    *) Feature: the "scheme" variable.
+    *) Feature: the $scheme variable.
 
     *) Feature: the "expires" directive supports the "max" parameter.
 
--- a/CHANGES.ru	Mon Oct 02 00:00:00 2006 +0400
+++ b/CHANGES.ru	Fri Oct 06 00:00:00 2006 +0400
@@ -1,7 +1,27 @@
 
+Изменения в nginx 0.4.6                                           06.10.2006
+
+    *) Исправление: nginx не запускался на 64-битных платформах, отличной 
+       от amd64, sparc64 и ppc64.
+
+    *) Исправление: при запросе версии HTTP/1.1 nginx передавал ответ 
+       chunk'ами, если длина ответа в методе 
+       $r->headers_out("Content-Length", ...) была задана текстовой строкой.
+
+    *) Исправление: после перенаправления ошибки с помощью директивы 
+       error_page любая директива модуля ngx_http_rewrite_module возвращала 
+       эту ошибку; ошибка появилась в 0.4.4.
+
+
+Изменения в nginx 0.4.5                                           02.10.2006
+
+    *) Исправление: nginx не собирался на Linux и Solaris; ошибка появилась 
+       в 0.4.4.
+
+
 Изменения в nginx 0.4.4                                           02.10.2006
 
-    *) Добавление: переменная scheme.
+    *) Добавление: переменная $scheme.
 
     *) Добавление: директива expires поддерживает параметр max.
 
--- a/auto/cc/gcc	Mon Oct 02 00:00:00 2006 +0400
+++ b/auto/cc/gcc	Fri Oct 06 00:00:00 2006 +0400
@@ -36,7 +36,7 @@
 
 case "$NGX_MACHINE" in
 
-    sun4u | sparc | sparc64 )
+    sun4u | sun4v | sparc | sparc64 )
         # "-mcpu=v9" enables the "casa" assembler instruction
         CFLAGS="$CFLAGS -mcpu=v9"
     ;;
--- a/auto/cc/sunc	Mon Oct 02 00:00:00 2006 +0400
+++ b/auto/cc/sunc	Fri Oct 06 00:00:00 2006 +0400
@@ -13,9 +13,9 @@
 have=NGX_COMPILER value="\"Sun C $NGX_SUNC_VER\"" . auto/define
 
 
-case "$NGX_PLATFORM" in
+case "$NGX_MACHINE" in
 
-    *:i86pc)
+    i86pc)
         ngx_feature="PAUSE hardware capability bug"
         ngx_feature_name=
         ngx_feature_run=bug
@@ -33,7 +33,7 @@
         NGX_AUX=" src/os/unix/ngx_sunpro_x86.il"
     ;;
 
-    *:sun4u)
+    sun4u | sun4v)
         # "-xarch=v9" enables the "casa" assembler instruction
         CFLAGS="$CFLAGS -xarch=v9"
         CORE_LINK="$CORE_LINK -xarch=v9"
--- a/auto/lib/perl/make	Mon Oct 02 00:00:00 2006 +0400
+++ b/auto/lib/perl/make	Fri Oct 06 00:00:00 2006 +0400
@@ -14,6 +14,8 @@
 
 	cd $NGX_OBJS/src/http/modules/perl && make
 
+	rm -rf $NGX_OBJS/install_perl
+
 
 $NGX_OBJS/src/http/modules/perl/Makefile:				\
 		src/http/modules/perl/Makefile.PL			\
@@ -30,5 +32,4 @@
 		$NGX_PERL Makefile.PL					\
 			LIB=$NGX_PERL_MODULES
 
-
 END
--- a/auto/os/conf	Mon Oct 02 00:00:00 2006 +0400
+++ b/auto/os/conf	Fri Oct 06 00:00:00 2006 +0400
@@ -83,7 +83,7 @@
         NGX_MACH_CACHE_LINE=64
     ;;
 
-    sun4u | sparc | sparc64)
+    sun4u | sun4v | sparc | sparc64)
         have=NGX_ALIGNMENT value=16 . auto/define
         # TODO
         NGX_MACH_CACHE_LINE=64
--- a/src/core/nginx.c	Mon Oct 02 00:00:00 2006 +0400
+++ b/src/core/nginx.c	Fri Oct 06 00:00:00 2006 +0400
@@ -352,7 +352,8 @@
                   "using inherited sockets from \"%s\"", inherited);
 
     if (ngx_array_init(&cycle->listening, cycle->pool, 10,
-                                         sizeof(ngx_listening_t)) == NGX_ERROR)
+                       sizeof(ngx_listening_t))
+        == NGX_ERROR)
     {
         return NGX_ERROR;
     }
--- a/src/core/nginx.h	Mon Oct 02 00:00:00 2006 +0400
+++ b/src/core/nginx.h	Fri Oct 06 00:00:00 2006 +0400
@@ -8,7 +8,7 @@
 #define _NGINX_H_INCLUDED_
 
 
-#define NGINX_VER          "nginx/0.4.5"
+#define NGINX_VER          "nginx/0.4.6"
 
 #define NGINX_VAR          "NGINX"
 #define NGX_OLDPID_EXT     ".oldbin"
--- a/src/core/ngx_hash.c	Mon Oct 02 00:00:00 2006 +0400
+++ b/src/core/ngx_hash.c	Fri Oct 06 00:00:00 2006 +0400
@@ -166,7 +166,7 @@
 
     bucket_size = hinit->bucket_size - sizeof(void *);
 
-    start = nelts / (bucket_size / (2 * sizeof(void *)) - 1);
+    start = nelts / (bucket_size / (2 * sizeof(void *)));
     start = start ? start : 1;
 
     if (hinit->max_size > 10000 && hinit->max_size / nelts < 100) {
--- a/src/http/modules/ngx_http_rewrite_module.c	Mon Oct 02 00:00:00 2006 +0400
+++ b/src/http/modules/ngx_http_rewrite_module.c	Fri Oct 06 00:00:00 2006 +0400
@@ -178,6 +178,10 @@
         code(e);
     }
 
+    if (e->status == NGX_DECLINED) {
+        return NGX_DECLINED;
+    }
+
     if (r->err_status == 0) {
         return e->status;
     }
--- a/src/http/modules/perl/nginx.xs	Mon Oct 02 00:00:00 2006 +0400
+++ b/src/http/modules/perl/nginx.xs	Fri Oct 06 00:00:00 2006 +0400
@@ -439,10 +439,9 @@
 
     if (header->key.len == sizeof("Content-Length") - 1
         && ngx_strncasecmp(header->key.data, "Content-Length",
-                           sizeof("Content-Length") - 1) == 0
-        && SvIOK(value))
+                           sizeof("Content-Length") - 1) == 0)
     {
-        r->headers_out.content_length_n = (ssize_t) SvIV(value);;
+        r->headers_out.content_length_n = (off_t) SvIV(value);
         r->headers_out.content_length = header;
     }
 
--- a/src/http/ngx_http_variables.c	Mon Oct 02 00:00:00 2006 +0400
+++ b/src/http/ngx_http_variables.c	Fri Oct 06 00:00:00 2006 +0400
@@ -640,7 +640,7 @@
             }
         }
 
-        if (n + prefix == var->len) {
+        if (n + prefix == var->len && n == header[i].key.len) {
             v->len = header[i].value.len;
             v->valid = 1;
             v->no_cachable = 0;