"charset" ignored / not set for proxied content-type text/css	resources
    Maxim Dounin 
    mdounin at mdounin.ru
       
    Tue Feb  9 00:37:25 MSK 2010
    
    
  
Hello!
On Mon, Feb 08, 2010 at 10:08:57PM +0100, Daniel Hahler wrote:
> I have the following config, where I've recently added "charset utf-8"
> so that the correct charset is used.
> 
> This works for application/x-javascript files (where "; charset=utf-8"
> gets added), but apparently gets ignored for "text/css" (which is not
> modified).
> 
>     location /media/cache {
>         expires max;
>         charset utf-8;
>         proxy_pass http://10.122.x.x;
>     }
> 
> I've verified that this config part gets used by commenting the
> "expires" line.
> 
> This looks like a bug to me.
> 
> I've noticed it with 0.7.62, but it's the same with 0.8.33.
As of now, by default charset module works only with the following 
types:
text/html
text/xml
text/plain
text/vnd.wap.wml
application/x-javascript
application/rss+xml
You may add more types via charset_types directive, see here (in 
Russian):
http://sysoev.ru/nginx/docs/http/ngx_http_charset_module.html#charset_types
There is no translation of this directive description in wiki yet, 
feel free to add one.
Maxim Dounin
    
    
More information about the nginx
mailing list