# HG changeset patch # User Igor Sysoev # Date 1242072000 -14400 # Node ID e66f886a83052c6a09dfbd77bfc78310dd7fd2d9 # Parent c91fb8e75a55aab2f01071880992bf1df248ef98 nginx 0.7.57 *) Bugfix: a segmentation fault occurred in worker process, if the ngx_http_image_filter_module errors were redirected to named location; the bug had appeared in 0.7.56. diff --git a/CHANGES b/CHANGES --- a/CHANGES +++ b/CHANGES @@ -1,4 +1,11 @@ +Changes with nginx 0.7.57 12 May 2009 + + *) Bugfix: a segmentation fault occurred in worker process, if the + ngx_http_image_filter_module errors were redirected to named + location; the bug had appeared in 0.7.56. + + Changes with nginx 0.7.56 11 May 2009 *) Feature: nginx/Windows supports IPv6 in a "listen" directive of the diff --git a/CHANGES.ru b/CHANGES.ru --- a/CHANGES.ru +++ b/CHANGES.ru @@ -1,4 +1,11 @@ +Изменения в nginx 0.7.57 12.05.2009 + + *) Исправление: при перенаправлении ошибок модуля + ngx_http_image_filter_module в именованный location в рабочем + процессе происходил floating-point fault; ошибка появилась в 0.7.56. + + Изменения в nginx 0.7.56 11.05.2009 *) Добавление: nginx/Windows поддерживает IPv6 в директиве listen diff --git a/auto/lib/md5/make b/auto/lib/md5/make --- a/auto/lib/md5/make +++ b/auto/lib/md5/make @@ -35,7 +35,7 @@ case "$NGX_PLATFORM" in `echo "$MD5/md5.lib: $NGX_MAKEFILE" | sed -e "s/\//$ngx_regex_dirsep/g"` cd `echo $MD5 | sed -e "s/\//$ngx_regex_dirsep/g"` \$(MAKE) -f $ngx_makefile $ngx_opt - cd ..\\..\\.. + cd \$(CURDIR) END diff --git a/auto/lib/openssl/make b/auto/lib/openssl/make --- a/auto/lib/openssl/make +++ b/auto/lib/openssl/make @@ -22,7 +22,7 @@ case "$CC" in perl Configure VC-WIN32 no-shared ms\\do_ms \$(MAKE) -f ms\\nt.mak - cd ..\\..\\.. + cd \$(CURDIR) END @@ -39,7 +39,7 @@ END perl Configure BC-32 no-shared ms\\do_nasm \$(MAKE) -f ms\\bcb.mak - cd ..\\..\\.. + cd \$(CURDIR) END diff --git a/auto/lib/pcre/make b/auto/lib/pcre/make --- a/auto/lib/pcre/make +++ b/auto/lib/pcre/make @@ -38,13 +38,12 @@ case "$NGX_PLATFORM" in `echo "$PCRE/pcre.h: $NGX_MAKEFILE" | sed -e "s/\//$ngx_regex_dirsep/g"` cd $ngx_pcre \$(MAKE) -f $ngx_makefile pcre.h - cd ..\\..\\.. - + cd \$(CURDIR) `echo "$PCRE/pcre.lib: $PCRE/pcre.h" | sed -e "s/\//$ngx_regex_dirsep/g"` cd $ngx_pcre \$(MAKE) -f $ngx_makefile $ngx_opt - cd ..\\..\\.. + cd \$(CURDIR) END diff --git a/auto/lib/pcre/makefile.bcc b/auto/lib/pcre/makefile.bcc --- a/auto/lib/pcre/makefile.bcc +++ b/auto/lib/pcre/makefile.bcc @@ -18,4 +18,4 @@ pcre.lib: pcre.h pcre.h: patch -o pcre.h pcre.in patch.pcre.in patch -o config.h config.in patch.config.in - patch -o pcre.c pcre.c patch.pcre.c + patch < patch.pcre.c diff --git a/auto/lib/pcre/makefile.msvc b/auto/lib/pcre/makefile.msvc --- a/auto/lib/pcre/makefile.msvc +++ b/auto/lib/pcre/makefile.msvc @@ -20,4 +20,4 @@ pcre.lib: pcre.h pcre.h: patch -o pcre.h pcre.in patch.pcre.in patch -o config.h config.in patch.config.in - patch -o pcre.c pcre.c patch.pcre.c + patch < patch.pcre.c diff --git a/auto/lib/sha1/make b/auto/lib/sha1/make --- a/auto/lib/sha1/make +++ b/auto/lib/sha1/make @@ -35,7 +35,7 @@ case "$NGX_PLATFORM" in `echo "$SHA1/sha1.lib: $NGX_MAKEFILE" | sed -e "s/\//$ngx_regex_dirsep/g"` cd `echo $SHA1 | sed -e "s/\//$ngx_regex_dirsep/g"` \$(MAKE) -f $ngx_makefile $ngx_opt - cd ..\\..\\.. + cd \$(CURDIR) END diff --git a/auto/lib/zlib/make b/auto/lib/zlib/make --- a/auto/lib/zlib/make +++ b/auto/lib/zlib/make @@ -36,7 +36,7 @@ case "$NGX_PLATFORM" in `echo "$ZLIB/zlib.lib: $NGX_MAKEFILE" | sed -e "s/\//$ngx_regex_dirsep/g"` cd `echo $ZLIB | sed -e "s/\//$ngx_regex_dirsep/g"` \$(MAKE) -f $ngx_makefile $ngx_opt - cd ..\\..\\.. + cd \$(CURDIR) END diff --git a/auto/make b/auto/make --- a/auto/make +++ b/auto/make @@ -22,6 +22,7 @@ CC = $CC CFLAGS = $CFLAGS CPP = $CPP LINK = $LINK +CURDIR = `pwd` END 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 7056 -#define NGINX_VERSION "0.7.56" +#define nginx_version 7057 +#define NGINX_VERSION "0.7.57" #define NGINX_VER "nginx/" NGINX_VERSION #define NGINX_VAR "NGINX" diff --git a/src/http/modules/ngx_http_image_filter_module.c b/src/http/modules/ngx_http_image_filter_module.c --- a/src/http/modules/ngx_http_image_filter_module.c +++ b/src/http/modules/ngx_http_image_filter_module.c @@ -162,6 +162,13 @@ ngx_http_image_header_filter(ngx_http_re return ngx_http_next_header_filter(r); } + ctx = ngx_http_get_module_ctx(r, ngx_http_image_filter_module); + + if (ctx) { + ngx_http_set_ctx(r, NULL, ngx_http_image_filter_module); + return ngx_http_next_header_filter(r); + } + conf = ngx_http_get_module_loc_conf(r, ngx_http_image_filter_module); if (conf->filter == NGX_HTTP_IMAGE_OFF) { @@ -181,13 +188,6 @@ ngx_http_image_header_filter(ngx_http_re return NGX_ERROR; } - ctx = ngx_http_get_module_ctx(r, ngx_http_image_filter_module); - - if (ctx) { - ngx_http_set_ctx(r, NULL, ngx_http_image_filter_module); - return ngx_http_next_header_filter(r); - } - ctx = ngx_pcalloc(r->pool, sizeof(ngx_http_image_filter_ctx_t)); if (ctx == NULL) { return NGX_ERROR; 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.7.56'; +our $VERSION = '0.7.57'; require XSLoader; XSLoader::load('nginx', $VERSION);