# HG changeset patch # User Igor Sysoev # Date 1257886800 -10800 # Node ID 40c366b3535c1c7c93baedb2ee910c1de0180e62 # Parent 48b3f4b6bc38030670f9396ce4e8344641f00e5a nginx 0.8.24 *) Bugfix: nginx always added "Content-Encoding: gzip" response header line in 304 responses sent by ngx_http_gzip_static_module. *) Bugfix: nginx could not be built without the --with-debug option; the bug had appeared in 0.8.23. *) Bugfix: the "unix:" parameter of the "set_real_ip_from" directive inherited incorrectly from previous level. *) Bugfix: in resolving empty name. diff --git a/CHANGES b/CHANGES --- a/CHANGES +++ b/CHANGES @@ -1,4 +1,18 @@ +Changes with nginx 0.8.24 11 Nov 2009 + + *) Bugfix: nginx always added "Content-Encoding: gzip" response header + line in 304 responses sent by ngx_http_gzip_static_module. + + *) Bugfix: nginx could not be built without the --with-debug option; + the bug had appeared in 0.8.23. + + *) Bugfix: the "unix:" parameter of the "set_real_ip_from" directive + inherited incorrectly from previous level. + + *) Bugfix: in resolving empty name. + + Changes with nginx 0.8.23 11 Nov 2009 *) Security: now SSL/TLS renegotiation is disabled. diff --git a/CHANGES.ru b/CHANGES.ru --- a/CHANGES.ru +++ b/CHANGES.ru @@ -1,7 +1,21 @@ +Изменения в nginx 0.8.24 11.11.2009 + + *) Исправление: nginx всегда добавлял строку "Content-Encoding: gzip" в + заголовок 304-ых ответов модуля ngx_http_gzip_static_module. + + *) Исправление: nginx не собирался без параметра --with-debug; ошибка + появилась в 0.8.23. + + *) Исправление: параметр "unix:" в директиве set_real_ip_from + неправильно наследовался с предыдущего уровня. + + *) Исправление: в resolver'е при определении пустого имени. + + Изменения в nginx 0.8.23 11.11.2009 - *) Безопасность: теперь SSL/TLS renegotiation запрещено. + *) Безопасность: теперь SSL/TLS renegotiation запрещён. Спасибо Максиму Дунину. *) Исправление: listen unix domain сокет не наследовались во время 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 8023 -#define NGINX_VERSION "0.8.23" +#define nginx_version 8024 +#define NGINX_VERSION "0.8.24" #define NGINX_VER "nginx/" NGINX_VERSION #define NGINX_VAR "NGINX" diff --git a/src/core/ngx_resolver.c b/src/core/ngx_resolver.c --- a/src/core/ngx_resolver.c +++ b/src/core/ngx_resolver.c @@ -1719,15 +1719,16 @@ static ngx_int_t ngx_resolver_create_name_query(ngx_resolver_node_t *rn, ngx_resolver_ctx_t *ctx) { u_char *p, *s; - size_t len; + size_t len, nlen; ngx_uint_t ident; ngx_resolver_qs_t *qs; ngx_resolver_query_t *query; - len = sizeof(ngx_resolver_query_t) - + 1 + ctx->name.len + 1 + sizeof(ngx_resolver_qs_t); - - p = ngx_resolver_calloc(ctx->resolver, len); + nlen = ctx->name.len ? (1 + ctx->name.len + 1) : 1; + + len = sizeof(ngx_resolver_query_t) + nlen + sizeof(ngx_resolver_qs_t); + + p = ngx_resolver_alloc(ctx->resolver, len); if (p == NULL) { return NGX_ERROR; } @@ -1754,8 +1755,7 @@ ngx_resolver_create_name_query(ngx_resol query->nns_hi = 0; query->nns_lo = 0; query->nar_hi = 0; query->nar_lo = 0; - p += sizeof(ngx_resolver_query_t) - + ctx->name.len ? (1 + ctx->name.len + 1) : 1; + p += sizeof(ngx_resolver_query_t) + nlen; qs = (ngx_resolver_qs_t *) p; @@ -1809,7 +1809,7 @@ ngx_resolver_create_addr_query(ngx_resol + sizeof(".255.255.255.255.in-addr.arpa.") - 1 + sizeof(ngx_resolver_qs_t); - p = ngx_resolver_calloc(ctx->resolver, len); + p = ngx_resolver_alloc(ctx->resolver, len); if (p == NULL) { return NGX_ERROR; } diff --git a/src/http/modules/ngx_http_not_modified_filter_module.c b/src/http/modules/ngx_http_not_modified_filter_module.c --- a/src/http/modules/ngx_http_not_modified_filter_module.c +++ b/src/http/modules/ngx_http_not_modified_filter_module.c @@ -88,6 +88,11 @@ ngx_http_not_modified_header_filter(ngx_ ngx_http_clear_content_length(r); ngx_http_clear_accept_ranges(r); + if (r->headers_out.content_encoding) { + r->headers_out.content_encoding->hash = 0; + r->headers_out.content_encoding = NULL; + } + return ngx_http_next_header_filter(r); } diff --git a/src/http/modules/ngx_http_realip_module.c b/src/http/modules/ngx_http_realip_module.c --- a/src/http/modules/ngx_http_realip_module.c +++ b/src/http/modules/ngx_http_realip_module.c @@ -26,7 +26,7 @@ typedef struct { ngx_uint_t hash; ngx_str_t header; #if (NGX_HAVE_UNIX_DOMAIN) - ngx_uint_t unixsock; /* unsigned unixsock:1; */ + ngx_uint_t unixsock; /* unsigned unixsock:2; */ #endif } ngx_http_realip_loc_conf_t; @@ -411,10 +411,12 @@ ngx_http_realip_create_loc_conf(ngx_conf * conf->from = NULL; * conf->hash = 0; * conf->header = { 0, NULL }; - * conf->unixsock = 0; */ conf->type = NGX_CONF_UNSET_UINT; +#if (NGX_HAVE_UNIX_DOMAIN) + conf->unixsock = 2; +#endif return conf; } @@ -428,10 +430,13 @@ ngx_http_realip_merge_loc_conf(ngx_conf_ if (conf->from == NULL) { conf->from = prev->from; + } + #if (NGX_HAVE_UNIX_DOMAIN) - conf->unixsock = prev->unixsock; + if (conf->unixsock == 2) { + conf->unixsock = (prev->unixsock == 2) ? 0 : prev->unixsock; + } #endif - } ngx_conf_merge_uint_value(conf->type, prev->type, NGX_HTTP_REALIP_XREALIP); 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 @@ -47,7 +47,7 @@ our @EXPORT = qw( HTTP_INSUFFICIENT_STORAGE ); -our $VERSION = '0.8.23'; +our $VERSION = '0.8.24'; require XSLoader; XSLoader::load('nginx', $VERSION); 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 @@ -170,7 +170,7 @@ ngx_master_process_cycle(ngx_cycle_t *cy ngx_time_update(0, 0); - ngx_log_debug0(NGX_LOG_DEBUG_EVENT, cycle->log, 0, + ngx_log_debug1(NGX_LOG_DEBUG_EVENT, cycle->log, 0, "wake up, sigio %i", sigio); if (ngx_reap) {