Skip to content

Commit e68463c

Browse files
authored
fix: remove duplicate part from the gzip patch (#18)
1 parent c623044 commit e68463c

File tree

1 file changed

+7
-8
lines changed

1 file changed

+7
-8
lines changed

patch/1.19.3/nginx-gzip.patch

+7-8
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
diff --git src/http/modules/ngx_http_gzip_filter_module.c src/http/modules/ngx_http_gzip_filter_module.c
2-
index c75169c..35b8433 100644
2+
index c75169c..723b040 100644
33
--- src/http/modules/ngx_http_gzip_filter_module.c
44
+++ src/http/modules/ngx_http_gzip_filter_module.c
55
@@ -8,6 +8,9 @@
@@ -66,7 +66,7 @@ index c75169c..35b8433 100644
6666
wbits = ngx_max(wbits, 13);
6767
}
6868

69-
@@ -615,6 +650,21 @@ ngx_http_gzip_filter_deflate_start(ngx_http_request_t *r,
69+
@@ -615,8 +650,20 @@ ngx_http_gzip_filter_deflate_start(ngx_http_request_t *r,
7070
ctx->zstream.zfree = ngx_http_gzip_filter_free;
7171
ctx->zstream.opaque = ctx;
7272

@@ -81,14 +81,13 @@ index c75169c..35b8433 100644
8181
+ rc = deflateInit2(&ctx->zstream, (int) level, Z_DEFLATED,
8282
+ ctx->wbits + 16, ctx->memlevel, Z_DEFAULT_STRATEGY);
8383
+#else
84-
+ rc = deflateInit2(&ctx->zstream, (int) conf->level, Z_DEFLATED,
85-
+ ctx->wbits + 16, ctx->memlevel, Z_DEFAULT_STRATEGY);
86-
+#endif
87-
+
8884
rc = deflateInit2(&ctx->zstream, (int) conf->level, Z_DEFLATED,
8985
ctx->wbits + 16, ctx->memlevel, Z_DEFAULT_STRATEGY);
86+
+#endif
9087

91-
@@ -705,6 +755,16 @@ ngx_http_gzip_filter_get_buf(ngx_http_request_t *r, ngx_http_gzip_ctx_t *ctx)
88+
if (rc != Z_OK) {
89+
ngx_log_error(NGX_LOG_ALERT, r->connection->log, 0,
90+
@@ -705,6 +752,16 @@ ngx_http_gzip_filter_get_buf(ngx_http_request_t *r, ngx_http_gzip_ctx_t *ctx)
9291

9392
conf = ngx_http_get_module_loc_conf(r, ngx_http_gzip_filter_module);
9493

@@ -105,7 +104,7 @@ index c75169c..35b8433 100644
105104
if (ctx->free) {
106105

107106
cl = ctx->free;
108-
@@ -713,9 +773,15 @@ ngx_http_gzip_filter_get_buf(ngx_http_request_t *r, ngx_http_gzip_ctx_t *ctx)
107+
@@ -713,9 +770,15 @@ ngx_http_gzip_filter_get_buf(ngx_http_request_t *r, ngx_http_gzip_ctx_t *ctx)
109108

110109
ngx_free_chain(r->pool, cl);
111110

0 commit comments

Comments
 (0)