1
1
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
3
3
--- src/http/modules/ngx_http_gzip_filter_module.c
4
4
+++ src/http/modules/ngx_http_gzip_filter_module.c
5
5
@@ -8,6 +8,9 @@
@@ -66,7 +66,7 @@ index c75169c..35b8433 100644
66
66
wbits = ngx_max(wbits, 13);
67
67
}
68
68
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,
70
70
ctx->zstream.zfree = ngx_http_gzip_filter_free;
71
71
ctx->zstream.opaque = ctx;
72
72
@@ -81,14 +81,13 @@ index c75169c..35b8433 100644
81
81
+ rc = deflateInit2(&ctx->zstream, (int) level, Z_DEFLATED,
82
82
+ ctx->wbits + 16, ctx->memlevel, Z_DEFAULT_STRATEGY);
83
83
+ #else
84
- + rc = deflateInit2(&ctx->zstream, (int) conf->level, Z_DEFLATED,
85
- + ctx->wbits + 16, ctx->memlevel, Z_DEFAULT_STRATEGY);
86
- + #endif
87
- +
88
84
rc = deflateInit2(&ctx->zstream, (int) conf->level, Z_DEFLATED,
89
85
ctx->wbits + 16, ctx->memlevel, Z_DEFAULT_STRATEGY);
86
+ + #endif
90
87
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)
92
91
93
92
conf = ngx_http_get_module_loc_conf(r, ngx_http_gzip_filter_module);
94
93
@@ -105,7 +104,7 @@ index c75169c..35b8433 100644
105
104
if (ctx->free) {
106
105
107
106
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)
109
108
110
109
ngx_free_chain(r->pool, cl);
111
110
0 commit comments