Mercurial > hg > nginx
diff src/http/modules/ngx_http_charset_filter.c @ 389:537de4dca8ca
nginx-0.0.7-2004-07-13-21:59:12 import
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Tue, 13 Jul 2004 17:59:12 +0000 |
parents | 2e3cbc1bbe3c |
children | 6f3b20c1ac50 |
line wrap: on
line diff
--- a/src/http/modules/ngx_http_charset_filter.c +++ b/src/http/modules/ngx_http_charset_filter.c @@ -148,12 +148,19 @@ static ngx_int_t ngx_http_charset_header } #endif - if (r->headers_out.content_type == NULL - || ngx_strncasecmp(r->headers_out.content_type->value.data, + if (r->headers_out.content_type == NULL) { + return ngx_http_next_header_filter(r); + } + + if (ngx_strncasecmp(r->headers_out.content_type->value.data, "text/", 5) != 0 - || ngx_strstr(r->headers_out.content_type->value.data, "charset") - != NULL - ) + && ngx_strncasecmp(r->headers_out.content_type->value.data, + "application/x-javascript", 24) != 0) + { + return ngx_http_next_header_filter(r); + } + + if (ngx_strstr(r->headers_out.content_type->value.data, "charset") != NULL) { return ngx_http_next_header_filter(r); }