How to disable chunked transfer-encoding

Maxim Dounin mdounin at
Thu Jun 4 20:58:05 MSD 2009


On Fri, Jun 05, 2009 at 12:23:54AM +0800, Zhang,Tony wrote:

> Hi
> I found that Nginx set chunked transfer-encoding as default, so how can I disable this transfer-encoding, because I am serving static content. And by the way, is it a little bit harmful to use chunked transfer encoding on serving static content?

Support for chunked encoding is required for HTTP/1.1 clients,  
and nginx doesn't use it for HTTP/1.0 clients (as required by RFC 
2616 too), so it should be safe.

But the question is - why chunked used in your case.  It's not 
used by nginx for static content with known length.  Possible 
reasons include SSI processing truned on and/or gzip enabled 
(since resulting length of the response isn't known while sending 
headers, and chunked transfer encoding is the only way to keep 
connections alive in this case).

Maxim Dounin

More information about the nginx mailing list