summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIgor Sysoev <igor@sysoev.ru>2009-11-11 14:53:24 +0000
committerJonathan Kolb <jon@b0g.us>2009-11-11 14:53:24 +0000
commit2aa2ddb37720134ff5c09e0e23cea8a9cf6da00e (patch)
treeea1f3a236c1de6f5891b8be114e00c790571226d
parent26aac3ef382a703ffae98d36c49f1fa528894816 (diff)
downloadnginx-2aa2ddb37720134ff5c09e0e23cea8a9cf6da00e.tar.gz
Changes with nginx 0.8.24 11 Nov 2009v0.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.
-rw-r--r--CHANGES14
-rw-r--r--CHANGES.ru16
-rw-r--r--src/core/nginx.h4
-rw-r--r--src/core/ngx_resolver.c14
-rw-r--r--src/http/modules/ngx_http_not_modified_filter_module.c5
-rw-r--r--src/http/modules/ngx_http_realip_module.c13
-rw-r--r--src/http/modules/perl/nginx.pm2
-rw-r--r--src/os/unix/ngx_process_cycle.c2
8 files changed, 54 insertions, 16 deletions
diff --git a/CHANGES b/CHANGES
index 92c248097..37f39a118 100644
--- 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
index cda820f61..9da1cd140 100644
--- 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
index bd80b2a1e..c57c52bee 100644
--- 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
index 48d569ea3..03527384e 100644
--- 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);
+ 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_calloc(ctx->resolver, len);
+ p = ngx_resolver_alloc(ctx->resolver, len);
if (p == NULL) {
return NGX_ERROR;
}
@@ -1754,8 +1755,7 @@ ngx_resolver_create_name_query(ngx_resolver_node_t *rn, ngx_resolver_ctx_t *ctx)
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_resolver_node_t *rn, ngx_resolver_ctx_t *ctx)
+ 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
index 5312b3a22..705815740 100644
--- 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_http_request_t *r)
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
index 7942042a3..b88b12242 100644
--- 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_t *cf)
* 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_t *cf, void *parent, void *child)
if (conf->from == NULL) {
conf->from = prev->from;
+ }
+
#if (NGX_HAVE_UNIX_DOMAIN)
- conf->unixsock = prev->unixsock;
-#endif
+ 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
index 7b8e34c1f..aadc2f870 100644
--- 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
index 4b7403054..e203ea3c9 100644
--- 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 *cycle)
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) {