From 365d081bd9e04e3a13b568d4de696c735770fbce Mon Sep 17 00:00:00 2001 From: Igor Sysoev Date: Tue, 19 Jul 2011 14:20:53 +0000 Subject: Changes with nginx 0.7.69 19 Jul 2011 *) Bugfix: a segmentation fault might occur in a worker process, if a caching was used. Thanks to Lanshun Zhou. --- src/core/nginx.h | 4 ++-- src/http/modules/perl/nginx.pm | 2 +- src/http/ngx_http_upstream.c | 9 +++++++++ 3 files changed, 12 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/core/nginx.h b/src/core/nginx.h index 590333fc7..f2ccaf931 100644 --- a/src/core/nginx.h +++ b/src/core/nginx.h @@ -8,8 +8,8 @@ #define _NGINX_H_INCLUDED_ -#define nginx_version 7068 -#define NGINX_VERSION "0.7.68" +#define nginx_version 7069 +#define NGINX_VERSION "0.7.69" #define NGINX_VER "nginx/" NGINX_VERSION #define NGINX_VAR "NGINX" diff --git a/src/http/modules/perl/nginx.pm b/src/http/modules/perl/nginx.pm index 15c2650bf..a0e5e8431 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.68'; +our $VERSION = '0.7.69'; require XSLoader; XSLoader::load('nginx', $VERSION); diff --git a/src/http/ngx_http_upstream.c b/src/http/ngx_http_upstream.c index 4e3c3ed76..e9aa9f1d3 100644 --- a/src/http/ngx_http_upstream.c +++ b/src/http/ngx_http_upstream.c @@ -620,6 +620,15 @@ ngx_http_upstream_cache(ngx_http_request_t *r, ngx_http_upstream_t *u) ngx_http_file_cache_create_key(r); + if (c->header_start >= u->conf->buffer_size) { + ngx_log_error(NGX_LOG_ERR, r->connection->log, 0, + "cache key too large, increase upstream buffer size %uz", + u->conf->buffer_size); + + r->cache = NULL; + return NGX_DECLINED; + } + u->cacheable = 1; c->min_uses = u->conf->cache_min_uses; -- cgit v1.2.1