From 6b052c8fcaf5dc57368cb615d990d4ae2c196fa8 Mon Sep 17 00:00:00 2001 From: "Yichun Zhang (agentzh)" Date: Thu, 29 Jan 2015 14:53:48 -0800 Subject: [PATCH] bugfix: ngx_http_redis failed to compile when the ngx_gzip module was disabled. thanks anod221 for the report in #79. --- patches/ngx_http_redis-0.3.7-without_gzip.patch | 12 ++++++++++++ util/mirror-tarballs | 3 +++ 2 files changed, 15 insertions(+) create mode 100644 patches/ngx_http_redis-0.3.7-without_gzip.patch diff --git a/patches/ngx_http_redis-0.3.7-without_gzip.patch b/patches/ngx_http_redis-0.3.7-without_gzip.patch new file mode 100644 index 0000000..ed83c93 --- /dev/null +++ b/patches/ngx_http_redis-0.3.7-without_gzip.patch @@ -0,0 +1,12 @@ +--- ngx_http_redis-0.3.7/ngx_http_redis_module.c 2013-11-28 20:41:16.000000000 -0800 ++++ ngx_http_redis-0.3.7-patched/ngx_http_redis_module.c 2015-01-29 12:26:58.195973401 -0800 +@@ -527,7 +527,9 @@ found: + ngx_str_set(&h->key, "Content-Encoding"); + ngx_str_set(&h->value, "gzip"); + h->lowcase_key = (u_char*) "content-encoding"; ++#if (NGX_HTTP_GZIP) + u->headers_in.content_encoding = h; ++#endif + } + + /* try to find end of string */ diff --git a/util/mirror-tarballs b/util/mirror-tarballs index f00d533..50fffae 100755 --- a/util/mirror-tarballs +++ b/util/mirror-tarballs @@ -418,6 +418,9 @@ mv ngx_http_redis-* redis-nginx-module-$ver || exit 1 cd redis-nginx-module-$ver echo "applying ngx_http_redis-$ver-variables_in_redis_pass.patch" patch -p1 < $root/patches/ngx_http_redis-$ver-variables_in_redis_pass.patch || exit 1 + +echo "applying ngx_http_redis-$ver-without_gzip.patch" +patch -p1 < $root/patches/ngx_http_redis-$ver-without_gzip.patch || exit 1 cd .. #################################