title: nginx gzip not working on browser but curl works
body: <p>my environment is nginx(1.3.11) + php-fpm</p>
  
  <pre><code>curl -I -H "Accept-Encoding: gzip,deflate" http://www.ihezhu.com/
  </code></pre>
  
  <p>the result is </p>
  
  <pre><code>HTTP/1.1 200 OK  
  Server: nginx  
  Date: Wed, 03 Jul 2013 07:47:27 GMT  
  Content-Type: text/html; charset=utf-8  
  Connection: keep-alive  
  Vary: Accept-Encoding  
  Set-Cookie: PHPSESSID=st7oa6mero58n6lmitlofa4n70; 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
  </code></pre>
  
  <p>but when i use browser like chrome and the response doesn't contain gzip<br>
  [there's a special case : when open <a href="http://www.ihezhu.com/list/md_area-c_beijing/f_2000.3000_0_0_0_0_0_0_0.0.0.0.0_0_0-s_time_asc-lt_list-p_1/" rel="nofollow">http://www.ihezhu.com/list/md_area-c_beijing/f_2000.3000_0_0_0_0_0_0_0.0.0.0.0_0_0-s_time_asc-lt_list-p_1/</a> , it's response gzip T_T]</p>
  
  <p>what's wrong?  </p>
  
  <p>my nginx setting is</p>
  
  <pre><code>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;
  </code></pre>
  
  <p>thanks</p>
  
  <h3>my nginx compile options, nginx virson now update to 1.5.2</h3>
  
  <pre><code>./configure \  
      --pid-path=/var/run/nginx.pid \  
      --lock-path=/var/lock/nginx.lock \  
      --user=nginx \  
      --group=nginx \  
      --with-http_realip_module \  
      --with-http_gzip_static_module \  
      --with-http_stub_status_module \  
      --with-pcre=/var/src/pcre-8.33 \  
      --with-zlib=/var/src/zlib-1.2.8 \  
      --http-client-body-temp-path=/var/tmp/nginx/client \  
      --http-proxy-temp-path=/var/tmp/nginx/proxy \  
      --http-fastcgi-temp-path=/var/tmp/nginx/fastcgi \  
      --http-uwsgi-temp-path=/var/tmp/nginx/uwsgi \  
      --http-scgi-temp-path=/var/tmp/nginx/scgi
  </code></pre>
  
  <h3>update info</h3>
  
  <p>the url <a href="http://www.ihezhu.com/list" rel="nofollow">http://www.ihezhu.com/list</a> and <a href="http://www.ihezhu.com/list/md_area-c_shanghai/f_0.0_0_0_0_0_0_0_0.0.0.0.0_0_0-s_time_asc-lt_list-p_1/" rel="nofollow">http://www.ihezhu.com/list/md_area-c_shanghai/f_0.0_0_0_0_0_0_0_0.0.0.0.0_0_0-s_time_asc-lt_list-p_1/</a> has same response content, but only the long one has gzip..</p>