From 67879a5fbbab34bfe5e8c17f789b3920907526b2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?agentzh=20=28=E7=AB=A0=E4=BA=A6=E6=98=A5=29?= Date: Thu, 13 Oct 2011 21:25:15 +0800 Subject: [PATCH] upgraded ngx_lua to v0.3.1rc11 and ngx_echo to 0.37rc6; also applied the named_location_clear_mods_ctx patch; also released ngx_openresty 1.0.8.5. --- .../nginx-1.0.8-named_location_clear_mods_ctx.patch | 12 ++++++++++++ .../nginx-1.1.5-named_location_clear_mods_ctx.patch | 12 ++++++++++++ util/mirror-tarballs | 6 ++++-- util/ver | 2 +- 4 files changed, 29 insertions(+), 3 deletions(-) create mode 100644 patches/nginx-1.0.8-named_location_clear_mods_ctx.patch create mode 100644 patches/nginx-1.1.5-named_location_clear_mods_ctx.patch diff --git a/patches/nginx-1.0.8-named_location_clear_mods_ctx.patch b/patches/nginx-1.0.8-named_location_clear_mods_ctx.patch new file mode 100644 index 0000000..fe4f7fe --- /dev/null +++ b/patches/nginx-1.0.8-named_location_clear_mods_ctx.patch @@ -0,0 +1,12 @@ +--- nginx-1.0.8/src/http/ngx_http_core_module.c 2011-09-27 19:14:02.000000000 +0800 ++++ nginx-1.0.8-patched/src/http/ngx_http_core_module.c 2011-10-13 15:02:24.414550532 +0800 +@@ -2542,6 +2542,9 @@ + r->content_handler = NULL; + r->loc_conf = (*clcfp)->loc_conf; + ++ /* clear the modules contexts */ ++ ngx_memzero(r->ctx, sizeof(void *) * ngx_http_max_module); ++ + ngx_http_update_location_config(r); + + cmcf = ngx_http_get_module_main_conf(r, ngx_http_core_module); diff --git a/patches/nginx-1.1.5-named_location_clear_mods_ctx.patch b/patches/nginx-1.1.5-named_location_clear_mods_ctx.patch new file mode 100644 index 0000000..6d9a5b1 --- /dev/null +++ b/patches/nginx-1.1.5-named_location_clear_mods_ctx.patch @@ -0,0 +1,12 @@ +--- nginx-1.1.5/src/http/ngx_http_core_module.c 2011-09-27 19:14:02.000000000 +0800 ++++ nginx-1.1.5-patched/src/http/ngx_http_core_module.c 2011-10-13 15:02:24.414550532 +0800 +@@ -2542,6 +2542,9 @@ + r->content_handler = NULL; + r->loc_conf = (*clcfp)->loc_conf; + ++ /* clear the modules contexts */ ++ ngx_memzero(r->ctx, sizeof(void *) * ngx_http_max_module); ++ + ngx_http_update_location_config(r); + + cmcf = ngx_http_get_module_main_conf(r, ngx_http_core_module); diff --git a/util/mirror-tarballs b/util/mirror-tarballs index c430f30..a903ca5 100755 --- a/util/mirror-tarballs +++ b/util/mirror-tarballs @@ -48,6 +48,8 @@ patch -p1 -l < $root/patches/nginx-$main_ver-gzip_empty_flush_buf.patch || exit patch -p1 < $root/patches/nginx-$main_ver-variable_header_ignore_no_hash.patch || exit 1 +patch -p1 < $root/patches/nginx-$main_ver-named_location_clear_mods_ctx.patch || exit 1 + rm -f *.patch || exit 1 cd .. || exit 1 @@ -57,7 +59,7 @@ sed -i $"s/NGINX_VERSION \".unknown/NGINX_VERSION \".$minor_ver/" \ ./nginx-no_pool.patch || exit 1 rm -rf no-pool-nginx-$ver -ver=0.37rc5 +ver=0.37rc6 $root/util/get-tarball "http://github.com/agentzh/echo-nginx-module/tarball/v$ver" -O echo-nginx-module-$ver.tar.gz || exit 1 tar -xzf echo-nginx-module-$ver.tar.gz || exit 1 mv agentzh-echo-nginx-module-* echo-nginx-module-$ver || exit 1 @@ -101,7 +103,7 @@ mv chaoslawful-drizzle-nginx-module-* drizzle-nginx-module-$ver || exit 1 ################################# -ver=0.3.1rc10 +ver=0.3.1rc11 $root/util/get-tarball "http://github.com/chaoslawful/lua-nginx-module/tarball/v$ver" -O lua-nginx-module-$ver.tar.gz || exit 1 tar -xzf lua-nginx-module-$ver.tar.gz || exit 1 mv chaoslawful-lua-nginx-module-* ngx_lua-$ver || exit 1 diff --git a/util/ver b/util/ver index b46795d..4bd7abf 100755 --- a/util/ver +++ b/util/ver @@ -1,7 +1,7 @@ #!/bin/bash main_ver=1.0.8 -minor_ver=2 +minor_ver=5 version=$main_ver.$minor_ver echo $version