Hi there,<br><br>I encountered a problem when using gzip_min_length with upstream + ssi:<br><br>ssi on;<br>gzip_min_length 1024;<br>upstream fastcgi_backends<br>{<br> server unix:/tmp/nx-fastcgi.sock.00;<br>}<br><br>I wrote a PHP script as:<br>
<br><?<br>header('Content-Length: 3');<br>echo '123';<br>?><br><br>and requested as:<br><br>GET /2.php HTTP/1.0<br>Accept-Encoding: gzip, deflate<br><br>nginx returned:<br><br>HTTP/1.1 200 OK<br>Server: nginx/0.8.15<br>
Date: Thu, 17 Sep 2009 09:39:57 GMT<br>Content-Type: text/html<br>Connection: close<br>X-Powered-By: PHP/5.2.8<br>Vary: Accept-Encoding<br>Content-Encoding: gzip<br><br>3426???<br><br>As you see, the content is compressed despite of gzip_min_length = 1024.<br>
<br>When I turned off ssi (ssi off;), gzip_min_length works:<br><br>HTTP/1.1 200 OK<br>Server: nginx/0.8.15<br>Date: Thu, 17 Sep 2009 09:48:11 GMT<br>Content-Type: text/html<br>Connection: close<br>X-Powered-By: PHP/5.2.8<br>
Content-Length: 3<br>Vary: Accept-Encoding<br><br>123<br><br>(Commenting out "ngx_http_clear_content_length(r);" in ngx_http_ssi_filter_module.c also works, I didn't test whether ssi still worked.)<br><br>Regards,<br>
jh<br>