# HG changeset patch # User Igor Sysoev # Date 1160078400 -14400 # Node ID ff906029dd401ffe8f723eed7385572c03285068 # Parent c3cf292cce38a2152c4157635844748b1152ce72 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. diff --git a/CHANGES b/CHANGES --- a/CHANGES +++ b/CHANGES @@ -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. diff --git a/CHANGES.ru b/CHANGES.ru --- a/CHANGES.ru +++ b/CHANGES.ru @@ -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. diff --git a/auto/cc/gcc b/auto/cc/gcc --- a/auto/cc/gcc +++ b/auto/cc/gcc @@ -36,7 +36,7 @@ fi case "$NGX_MACHINE" in - sun4u | sparc | sparc64 ) + sun4u | sun4v | sparc | sparc64 ) # "-mcpu=v9" enables the "casa" assembler instruction CFLAGS="$CFLAGS -mcpu=v9" ;; diff --git a/auto/cc/sunc b/auto/cc/sunc --- a/auto/cc/sunc +++ b/auto/cc/sunc @@ -13,9 +13,9 @@ echo " + Sun C version: $NGX_SUNC_VER" 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 @@ case "$NGX_PLATFORM" in 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" diff --git a/auto/lib/perl/make b/auto/lib/perl/make --- a/auto/lib/perl/make +++ b/auto/lib/perl/make @@ -14,6 +14,8 @@ cat << END 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 @@ cat << END $NGX_PERL Makefile.PL \ LIB=$NGX_PERL_MODULES - END diff --git a/auto/os/conf b/auto/os/conf --- a/auto/os/conf +++ b/auto/os/conf @@ -83,7 +83,7 @@ case "$NGX_MACHINE" in 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 diff --git a/src/core/nginx.c b/src/core/nginx.c --- a/src/core/nginx.c +++ b/src/core/nginx.c @@ -352,7 +352,8 @@ ngx_add_inherited_sockets(ngx_cycle_t *c "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; } diff --git a/src/core/nginx.h b/src/core/nginx.h --- a/src/core/nginx.h +++ b/src/core/nginx.h @@ -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" diff --git a/src/core/ngx_hash.c b/src/core/ngx_hash.c --- a/src/core/ngx_hash.c +++ b/src/core/ngx_hash.c @@ -166,7 +166,7 @@ ngx_hash_init(ngx_hash_init_t *hinit, ng 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) { diff --git a/src/http/modules/ngx_http_rewrite_module.c b/src/http/modules/ngx_http_rewrite_module.c --- a/src/http/modules/ngx_http_rewrite_module.c +++ b/src/http/modules/ngx_http_rewrite_module.c @@ -178,6 +178,10 @@ ngx_http_rewrite_handler(ngx_http_reques code(e); } + if (e->status == NGX_DECLINED) { + return NGX_DECLINED; + } + if (r->err_status == 0) { return e->status; } diff --git a/src/http/modules/perl/nginx.xs b/src/http/modules/perl/nginx.xs --- a/src/http/modules/perl/nginx.xs +++ b/src/http/modules/perl/nginx.xs @@ -439,10 +439,9 @@ header_out(r, key, value) 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; } diff --git a/src/http/ngx_http_variables.c b/src/http/ngx_http_variables.c --- a/src/http/ngx_http_variables.c +++ b/src/http/ngx_http_variables.c @@ -640,7 +640,7 @@ ngx_http_variable_unknown_header(ngx_htt } } - 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;