curl can response gzip but browser can't

wingoo nginx-forum at nginx.us
Fri Jan 18 11:11:06 UTC 2013


my environment is nginx(1.3.11) + php-fpm

curl -I -H "Accept-Encoding: gzip,deflate" http://www.ihezhu.com/

HTTP/1.1 200 OK
Server: nginx
Date: Fri, 18 Jan 2013 05:18:31 GMT
Content-Type: text/html; charset=utf-8
Connection: keep-alive
Vary: Accept-Encoding
Set-Cookie: PHPSESSID=2quqa651uglt62ku49re2nt1n4; path=/
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control: no-store, no-cache, must-revalidate, post-check=0,
pre-check=0
Pragma: no-cache
Content-Encoding: gzip

but when use browser like chrome and it's response not contain
Content-Encoding, what's wrong?

my nginx setting is

    gzip on;
    gzip_buffers 4 16k;
    gzip_comp_level 3;
    gzip_http_version 1.1;
    gzip_min_length 1k;
    gzip_proxied any;
    gzip_types text/plain text/css application/json application/x-javascript
text/xml application/xml application/xml+rss text/javascript;
    gzip_vary on;
    gzip_disable msie6;

thanks

Posted at Nginx Forum: http://forum.nginx.org/read.php?2,235266,235266#msg-235266



More information about the nginx mailing list