summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorIgor Sysoev <igor@sysoev.ru>2008-06-20 14:33:36 +0000
committerIgor Sysoev <igor@sysoev.ru>2008-06-20 14:33:36 +0000
commit77c287f35de645503da297f6c5657fd1d63514ae (patch)
treec4724b62cdc5a934a0262534e299a4a5e181ff63
parent7f6b2ffc60135a8340213fe8d5d0b70e479e3ac1 (diff)
downloadnginx-77c287f35de645503da297f6c5657fd1d63514ae.tar.gz
nginx-77c287f35de645503da297f6c5657fd1d63514ae.tar.bz2
disable charset if there is "Content-Encoding" header
-rw-r--r--src/http/modules/ngx_http_charset_filter_module.c6
1 files changed, 6 insertions, 0 deletions
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);
}