summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CHANGES13
-rw-r--r--CHANGES.ru13
-rw-r--r--src/core/nginx.h2
-rw-r--r--src/http/modules/ngx_http_log_module.c7
-rw-r--r--src/http/modules/ngx_http_ssi_filter_module.c5
-rw-r--r--src/http/modules/ngx_http_sub_filter_module.c4
-rw-r--r--src/http/modules/perl/nginx.pm2
-rw-r--r--src/http/ngx_http_header_filter_module.c4
-rw-r--r--src/http/ngx_http_request.c4
9 files changed, 46 insertions, 8 deletions
diff --git a/CHANGES b/CHANGES
index 73e01d697..706e7dd2e 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,4 +1,17 @@
+Changes with nginx 0.7.5 01 Jul 2008
+
+ *) Bugfixes in variables support in the "access_log" directive; the bug
+ had appeared in 0.7.4.
+
+ *) Bugfix: nginx could not be built --without-http_gzip_module; the bug
+ had appeared in 0.7.3.
+ Thanks to Kirill A. Korinskiy.
+
+ *) Bugfix: if sub_filter and SSI were used together, then responses
+ might were transferred incorrectly.
+
+
Changes with nginx 0.7.4 30 Jun 2008
*) Feature: variables support in the "access_log" directive.
diff --git a/CHANGES.ru b/CHANGES.ru
index ba9cfa487..a950aa5f8 100644
--- a/CHANGES.ru
+++ b/CHANGES.ru
@@ -1,4 +1,17 @@
+Изменения в nginx 0.7.5 01.07.2008
+
+ *) Исправления в поддержке переменных в директиве access_log; ошибка
+ появилась в 0.7.4.
+
+ *) Исправление: nginx не собирался с параметром
+ --without-http_gzip_module; ошибка появилась в 0.7.3.
+ Спасибо Кириллу Коринскому.
+
+ *) Исправление: при совместном использовании sub_filter и SSI ответы
+ могли передаваться неверно.
+
+
Изменения в nginx 0.7.4 30.06.2008
*) Добавление: директива access_log поддерживает переменные.
diff --git a/src/core/nginx.h b/src/core/nginx.h
index 2e31eb1eb..4c397c12c 100644
--- a/src/core/nginx.h
+++ b/src/core/nginx.h
@@ -8,7 +8,7 @@
#define _NGINX_H_INCLUDED_
-#define NGINX_VERSION "0.7.4"
+#define NGINX_VERSION "0.7.5"
#define NGINX_VER "nginx/" NGINX_VERSION
#define NGINX_VAR "NGINX"
diff --git a/src/http/modules/ngx_http_log_module.c b/src/http/modules/ngx_http_log_module.c
index b2a23dd70..ce7559753 100644
--- a/src/http/modules/ngx_http_log_module.c
+++ b/src/http/modules/ngx_http_log_module.c
@@ -422,7 +422,8 @@ ngx_http_log_script_write(ngx_http_request_t *r, ngx_http_log_script_t *script,
{
ngx_log_error(NGX_LOG_CRIT, r->connection->log, ngx_errno,
ngx_open_file_n " \"%s\" failed", log.data);
- return -1;
+ /* simulate successfull logging */
+ return len;
}
ngx_log_debug1(NGX_LOG_DEBUG_HTTP, r->connection->log, 0,
@@ -760,7 +761,8 @@ ngx_http_log_merge_loc_conf(ngx_conf_t *cf, void *parent, void *child)
return NGX_CONF_OK;
}
- *conf = *prev;
+ conf->logs = prev->logs;
+ conf->off = prev->off;
if (conf->logs || conf->off) {
return NGX_CONF_OK;
@@ -781,6 +783,7 @@ ngx_http_log_merge_loc_conf(ngx_conf_t *cf, void *parent, void *child)
return NGX_CONF_ERROR;
}
+ log->script = NULL;
log->disk_full_time = 0;
log->error_log_time = 0;
diff --git a/src/http/modules/ngx_http_ssi_filter_module.c b/src/http/modules/ngx_http_ssi_filter_module.c
index a855868c4..d8fc8f3fc 100644
--- a/src/http/modules/ngx_http_ssi_filter_module.c
+++ b/src/http/modules/ngx_http_ssi_filter_module.c
@@ -558,8 +558,9 @@ ngx_http_ssi_body_filter(ngx_http_request_t *r, ngx_chain_t *in)
if (b->in_file) {
if (slcf->min_file_chunk < (size_t) (b->last - b->pos))
{
- b->file_last = b->file_pos + (b->last - b->start);
- b->file_pos += b->pos - b->start;
+ b->file_last = b->file_pos
+ + (b->last - ctx->buf->pos);
+ b->file_pos += b->pos - ctx->buf->pos;
} else {
b->in_file = 0;
diff --git a/src/http/modules/ngx_http_sub_filter_module.c b/src/http/modules/ngx_http_sub_filter_module.c
index 6a9bb1c59..e45ca6e49 100644
--- a/src/http/modules/ngx_http_sub_filter_module.c
+++ b/src/http/modules/ngx_http_sub_filter_module.c
@@ -322,8 +322,8 @@ ngx_http_sub_body_filter(ngx_http_request_t *r, ngx_chain_t *in)
b->recycled = 0;
if (b->in_file) {
- b->file_last = b->file_pos + (b->last - b->start);
- b->file_pos += b->pos - b->start;
+ b->file_last = b->file_pos + (b->last - ctx->buf->pos);
+ b->file_pos += b->pos - ctx->buf->pos;
}
cl->next = NULL;
diff --git a/src/http/modules/perl/nginx.pm b/src/http/modules/perl/nginx.pm
index c23e89d28..346c2c052 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.7.4';
+our $VERSION = '0.7.5';
require XSLoader;
XSLoader::load('nginx', $VERSION);
diff --git a/src/http/ngx_http_header_filter_module.c b/src/http/ngx_http_header_filter_module.c
index 777b526e7..7714873e0 100644
--- a/src/http/ngx_http_header_filter_module.c
+++ b/src/http/ngx_http_header_filter_module.c
@@ -347,9 +347,11 @@ ngx_http_header_filter(ngx_http_request_t *r)
len += sizeof("Connection: closed" CRLF) - 1;
}
+#if (NGX_HTTP_GZIP)
if (r->gzip && clcf->gzip_vary) {
len += sizeof("Vary: Accept-Encoding" CRLF) - 1;
}
+#endif
part = &r->headers_out.headers.part;
header = part->elts;
@@ -520,10 +522,12 @@ ngx_http_header_filter(ngx_http_request_t *r)
sizeof("Connection: close" CRLF) - 1);
}
+#if (NGX_HTTP_GZIP)
if (r->gzip && clcf->gzip_vary) {
b->last = ngx_cpymem(b->last, "Vary: Accept-Encoding" CRLF,
sizeof("Vary: Accept-Encoding" CRLF) - 1);
}
+#endif
part = &r->headers_out.headers.part;
header = part->elts;
diff --git a/src/http/ngx_http_request.c b/src/http/ngx_http_request.c
index d707e33be..8dc562f28 100644
--- a/src/http/ngx_http_request.c
+++ b/src/http/ngx_http_request.c
@@ -2623,6 +2623,8 @@ ngx_http_request_done(ngx_http_request_t *r, ngx_int_t error)
r->headers_out.status = error;
}
+ log->action = "logging request";
+
cmcf = ngx_http_get_module_main_conf(r, ngx_http_core_module);
log_handler = cmcf->phases[NGX_HTTP_LOG_PHASE].handlers.elts;
@@ -2631,6 +2633,8 @@ ngx_http_request_done(ngx_http_request_t *r, ngx_int_t error)
log_handler[i](r);
}
+ log->action = "closing request";
+
if (r->connection->timedout) {
clcf = ngx_http_get_module_loc_conf(r, ngx_http_core_module);