gzip issues [bug?] Content-type has charset set

Igor Sysoev is at rambler-co.ru
Sat May 2 09:22:02 MSD 2009


On Sat, May 02, 2009 at 12:26:25AM +0200, Joe Bofh wrote:

> I have 2 sites set up, one gzips the js and css as requested with no
> issues and the other does not.  I spent some time scratching my head on
> this one till I noticed the following
> 
> 
> The site that does not compress when requested has:
> 
> Content-Type: application/x-javascript; charset=utf-8
> 
> And the site that does compress has:
> 
> Content-Type: application/x-javascript
> 
> My gzip config is as follows:
>   gzip_http_version 1.1;
>   gzip_vary on;
>   gzip_comp_level 6;
>   gzip_proxied any;
>   gzip_types text/plain text/css application/json
> application/x-javascript text/xml application/xml application/xml+rss
> text/javascript;
> 
> 
> How do I get nginx to gzip content for the first site? It should ignore
> the charset which should not matter in this case.

nginx ignores charset when gzipping. Where does this response come from ?
Is it a static response or a proxied one ?


-- 
Igor Sysoev
http://sysoev.ru/en/





More information about the nginx mailing list