# HG changeset patch # User Igor Sysoev # Date 1292187600 -10800 # Node ID 7ea1bba9a4f6fedf1df77201fa15abc0ef07639d # Parent f6fa6099ee593c01e2a61ad4541e700e956c49e2 nginx 0.9.3 *) 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: nginx could not be built on Solaris; the bug had appeared in 0.9.0. diff --git a/CHANGES b/CHANGES --- a/CHANGES +++ b/CHANGES @@ -1,4 +1,14 @@ +Changes with nginx 0.9.3 13 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: nginx could not be built on Solaris; the bug had appeared in + 0.9.0. + + Changes with nginx 0.9.2 06 Dec 2010 *) Feature: the "If-Unmodified-Since" client request header line @@ -7,8 +17,8 @@ Changes with nginx 0.9.2 *) Workaround: fallback to accept() syscall if accept4() was not implemented; the issue had appeared in 0.9.0. - *) Bugfix: nginx could not be built on Cygwin; the issue had appeared - in 0.9.0. + *) Bugfix: nginx could not be built on Cygwin; the bug had appeared in + 0.9.0. *) Bugfix: for OpenSSL vulnerability CVE-2010-4180. Thanks to Maxim Dounin. @@ -1255,7 +1265,7 @@ Changes with nginx 0.7.44 *) 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. diff --git a/CHANGES.ru b/CHANGES.ru --- a/CHANGES.ru +++ b/CHANGES.ru @@ -1,4 +1,14 @@ +Изменения в nginx 0.9.3 13.12.2010 + + *) Исправление: если для пары адрес:порт описан только один сервер, то + выделения в регулярных выражениях в директиве server_name не + работали. + + *) Исправление: nginx не собирался под Solaris; ошибка появилась в + 0.9.0. + + Изменения в nginx 0.9.2 06.12.2010 *) Добавление: поддержка строки "If-Unmodified-Since" в заголовке diff --git a/auto/unix b/auto/unix --- a/auto/unix +++ b/auto/unix @@ -119,16 +119,42 @@ ngx_feature_test='printf("%d", sys_nerr) . auto/feature -# Cygiwn defines _sys_nerr -ngx_feature="_sys_nerr" -ngx_feature_name="NGX_SYS_NERR" -ngx_feature_run=value -ngx_feature_incs='#include - #include ' -ngx_feature_path= -ngx_feature_libs= -ngx_feature_test='printf("%d", _sys_nerr);' -. auto/feature +if [ $ngx_found = no ]; then + + # Cygiwn defines _sys_nerr + ngx_feature="_sys_nerr" + ngx_feature_name="NGX_SYS_NERR" + ngx_feature_run=value + ngx_feature_incs='#include + #include ' + ngx_feature_path= + ngx_feature_libs= + ngx_feature_test='printf("%d", _sys_nerr);' + . auto/feature +fi + + +if [ $ngx_found = no ]; then + + # Solaris has no sys_nerr + ngx_feature='maximum errno' + ngx_feature_name=NGX_SYS_NERR + ngx_feature_run=value + ngx_feature_incs='#include + #include ' + ngx_feature_path= + ngx_feature_libs= + ngx_feature_test='int n; + for (n = 1; n < 1000; n++) { + errno = 0; + strerror(n); + if (errno == EINVAL) { + printf("%d", n); + return 0; + } + }' + . auto/feature +fi ngx_feature="localtime_r()" diff --git a/src/core/nginx.h b/src/core/nginx.h --- a/src/core/nginx.h +++ b/src/core/nginx.h @@ -8,8 +8,8 @@ #define _NGINX_H_INCLUDED_ -#define nginx_version 9002 -#define NGINX_VERSION "0.9.2" +#define nginx_version 9003 +#define NGINX_VERSION "0.9.3" #define NGINX_VER "nginx/" NGINX_VERSION #define NGINX_VAR "NGINX" diff --git a/src/core/ngx_log.c b/src/core/ngx_log.c --- a/src/core/ngx_log.c +++ b/src/core/ngx_log.c @@ -148,9 +148,9 @@ ngx_log_error_core(ngx_uint_t level, ngx return; } - msg -= (7 + err_levels[level].len + 4); + msg -= (7 + err_levels[level].len + 3); - (void) ngx_sprintf(msg, "nginx: [%V]: ", &err_levels[level]); + (void) ngx_sprintf(msg, "nginx: [%V] ", &err_levels[level]); (void) ngx_write_console(ngx_stderr, msg, p - msg); } diff --git a/src/http/modules/perl/nginx.pm b/src/http/modules/perl/nginx.pm --- a/src/http/modules/perl/nginx.pm +++ b/src/http/modules/perl/nginx.pm @@ -48,7 +48,7 @@ our @EXPORT = qw( HTTP_INSUFFICIENT_STORAGE ); -our $VERSION = '0.9.2'; +our $VERSION = '0.9.3'; require XSLoader; XSLoader::load('nginx', $VERSION); diff --git a/src/http/ngx_http.c b/src/http/ngx_http.c --- a/src/http/ngx_http.c +++ b/src/http/ngx_http.c @@ -1502,7 +1502,7 @@ ngx_http_server_names(ngx_conf_t *cf, ng } if (rc == NGX_BUSY) { - ngx_log_error(NGX_LOG_WARN, cf->log, 0, + ngx_log_error(NGX_LOG_WARN, cf->log, 0, "conflicting server name \"%V\" on %s, ignored", &name[n].name, addr->opt.addr); } @@ -1870,8 +1870,12 @@ ngx_http_add_addrs6(ngx_conf_t *cf, ngx_ 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; } diff --git a/src/os/unix/ngx_process_cycle.c b/src/os/unix/ngx_process_cycle.c --- a/src/os/unix/ngx_process_cycle.c +++ b/src/os/unix/ngx_process_cycle.c @@ -291,6 +291,11 @@ ngx_single_process_cycle(ngx_cycle_t *cy { ngx_uint_t i; + if (ngx_set_environment(cycle, NULL) == NULL) { + /* fatal */ + exit(2); + } + for (i = 0; ngx_modules[i]; i++) { if (ngx_modules[i]->init_process) { if (ngx_modules[i]->init_process(cycle) == NGX_ERROR) {