From f8681beacbed691f41145deb2acf50c2e8134c7a Mon Sep 17 00:00:00 2001 From: lijunlong Date: Tue, 28 Jun 2022 14:23:16 +0800 Subject: [PATCH] update handling of content-encoding in nginx-1.23. --- ngx_http_redis_module.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ngx_http_redis_module.c b/ngx_http_redis_module.c index 4b90db7..16201ba 100644 --- a/ngx_http_redis_module.c +++ b/ngx_http_redis_module.c @@ -581,8 +581,10 @@ ngx_http_redis_process_header(ngx_http_request_t *r) ngx_str_set(&h->key, "Content-Encoding"); ngx_str_set(&h->value, "gzip"); h->lowcase_key = (u_char*) "content-encoding"; +#if defined(nginx_version) && nginx_version < 1023000 #if (NGX_HTTP_GZIP) u->headers_in.content_encoding = h; +#endif #endif }