Welcome! Log In Create A New Profile

Advanced

curl can response gzip but browser can't

January 18, 2013 06:11AM
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
SubjectAuthorPosted

curl can response gzip but browser can't

wingooJanuary 18, 2013 06:11AM

Re: curl can response gzip but browser can't

Maxim DouninJanuary 20, 2013 07:40PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 91
Record Number of Users: 7 on March 06, 2014
Record Number of Guests: 229 on August 01, 2014
Powered by nginx    Powered by FreeBSD    PHP Powered    Powered by Percona     ipv6 ready