summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIgor Sysoev <igor@sysoev.ru>2009-08-10 08:26:33 +0000
committerJonathan Kolb <jon@b0g.us>2009-08-10 08:26:33 +0000
commit28ee64eb5666e0dff44f597e3791234cf2275ffd (patch)
treeafb4cf19c5f2238beef4b08e92047ad59856a0e5
parent93a2c2abaa9fc731180fb97c7a63f61cd8b4d123 (diff)
downloadnginx-0.8.8.tar.gz
Changes with nginx 0.8.8 10 Aug 2009v0.8.8
*) Bugfix: in handling FastCGI headers split in records. *) Bugfix: a segmentation fault occurred in worker process, if a request was handled in two proxied or FastCGIed locations and a caching was enabled in the first location; the bug had appeared in 0.8.7.
-rw-r--r--CHANGES10
-rw-r--r--CHANGES.ru11
-rw-r--r--src/core/nginx.h4
-rw-r--r--src/http/modules/ngx_http_fastcgi_module.c9
-rw-r--r--src/http/modules/perl/nginx.pm2
-rw-r--r--src/http/ngx_http_upstream.c2
6 files changed, 32 insertions, 6 deletions
diff --git a/CHANGES b/CHANGES
index cd2e3f68f..77afb576e 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,4 +1,14 @@
+Changes with nginx 0.8.8 10 Aug 2009
+
+ *) Bugfix: in handling FastCGI headers split in records.
+
+ *) Bugfix: a segmentation fault occurred in worker process, if a
+ request was handled in two proxied or FastCGIed locations and a
+ caching was enabled in the first location; the bug had appeared in
+ 0.8.7.
+
+
Changes with nginx 0.8.7 27 Jul 2009
*) Change: minimum supported OpenSSL version is 0.9.7.
diff --git a/CHANGES.ru b/CHANGES.ru
index 5eb1033b3..282e0b05e 100644
--- a/CHANGES.ru
+++ b/CHANGES.ru
@@ -1,4 +1,15 @@
+Изменения в nginx 0.8.8 10.08.2009
+
+ *) Исправление: в обработке заголовков ответа, разделённых в
+ FastCGI-записях.
+
+ *) Исправление: если запрос обрабатывался в двух проксированных или
+ FastCGI location'ах и в первом из них использовалось кэширование, то
+ в рабочем процессе происходил segmentation fault; ошибка появилась в
+ 0.8.7.
+
+
Изменения в nginx 0.8.7 27.07.2009
*) Изменение: минимальная поддерживаемая версия OpenSSL - 0.9.7.
diff --git a/src/core/nginx.h b/src/core/nginx.h
index 41b3a8933..dc8d27138 100644
--- a/src/core/nginx.h
+++ b/src/core/nginx.h
@@ -8,8 +8,8 @@
#define _NGINX_H_INCLUDED_
-#define nginx_version 8007
-#define NGINX_VERSION "0.8.7"
+#define nginx_version 8008
+#define NGINX_VERSION "0.8.8"
#define NGINX_VER "nginx/" NGINX_VERSION
#define NGINX_VAR "NGINX"
diff --git a/src/http/modules/ngx_http_fastcgi_module.c b/src/http/modules/ngx_http_fastcgi_module.c
index 1855e3ccb..fc0cf14e1 100644
--- a/src/http/modules/ngx_http_fastcgi_module.c
+++ b/src/http/modules/ngx_http_fastcgi_module.c
@@ -1065,7 +1065,7 @@ ngx_http_fastcgi_reinit_request(ngx_http_request_t *r)
static ngx_int_t
ngx_http_fastcgi_process_header(ngx_http_request_t *r)
{
- u_char *p, *start, *last, *part_start;
+ u_char *p, *start, *last, *part_start, *part_end;
size_t size;
ngx_str_t *status_line, line, *pattern;
ngx_int_t rc, status;
@@ -1237,6 +1237,7 @@ ngx_http_fastcgi_process_header(ngx_http_request_t *r)
for ( ;; ) {
part_start = u->buffer.pos;
+ part_end = u->buffer.last;
rc = ngx_http_parse_header_line(r, &u->buffer, 1);
@@ -1437,7 +1438,11 @@ ngx_http_fastcgi_process_header(ngx_http_request_t *r)
part = ngx_array_push(f->split_parts);
part->start = part_start;
- part->end = u->buffer.last;
+ part->end = part_end;
+
+ if (u->buffer.pos < u->buffer.last) {
+ continue;
+ }
return NGX_AGAIN;
}
diff --git a/src/http/modules/perl/nginx.pm b/src/http/modules/perl/nginx.pm
index 75d0a1307..52a7bcecc 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.7';
+our $VERSION = '0.8.8';
require XSLoader;
XSLoader::load('nginx', $VERSION);
diff --git a/src/http/ngx_http_upstream.c b/src/http/ngx_http_upstream.c
index 23cf1b605..e705da6c2 100644
--- a/src/http/ngx_http_upstream.c
+++ b/src/http/ngx_http_upstream.c
@@ -2883,7 +2883,7 @@ ngx_http_upstream_finalize_request(ngx_http_request_t *r,
#if (NGX_HTTP_CACHE)
- if (u->cacheable) {
+ if (u->cacheable && r->cache) {
time_t valid;
ngx_log_debug1(NGX_LOG_DEBUG_HTTP, r->connection->log, 0,