diff --git a/src/http/modules/ngx_http_charset_filter_module.c b/src/http/modules/ngx_http_charset_filter_module.c index 850e64e75..a5db2d878 100644 --- a/src/http/modules/ngx_http_charset_filter_module.c +++ b/src/http/modules/ngx_http_charset_filter_module.c @@ -204,6 +204,12 @@ ngx_http_charset_header_filter(ngx_http_request_t *r) if (r == r->main) { + if (r->headers_out.content_encoding + && r->headers_out.content_encoding->value.len) + { + return ngx_http_next_header_filter(r); + } + if (r->headers_out.content_type.len == 0) { return ngx_http_next_header_filter(r); }