Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

The default value for gzip_http_version setting in nginx's gzip module is HTTP 1.1. Why? Is there any problem with using gzip and HTTP 1.0?

share|improve this question

nginx gzip_http_version can have HTTP 1.0 and has it's caveats.

When HTTP version 1.0 is used, the Vary: Accept-Encoding header is not set. As
this can lead to proxy cache corruption, consider adding it with add_header.
Also note that the Content-Length header is not set when using either version.
Keepalives will therefore be impossible with version 1.0, while for 1.1 it is
handled by chunked transfers.  

More here --

share|improve this answer
The first sentence has been removed from newer versions of the documentation, so presumably it does now still send the Vary header. But the impossibility of using keep-alive when gzipping on HTTP 1.0 (because the content-length cannot be known prior to output) still exists and there's no way around that. So decide which is worse: HTTP 1.0 clients missing out on gzip, or HTTP 1.0 clients missing out on keep-alive (which often isn't possible for dynamic scripts on HTTP 1.0 anyway). – thomasrutter Jan 24 '14 at 7:01

It's most probably because HTTP 1.1 is the current version. There is little sense in defaulting to the previous version if the current verison is well adopted.

share|improve this answer
This setting does not control what HTTP version is used, it controls whether gzip should be disabled for HTTP 1.0 requests. – thomasrutter Jan 24 '14 at 0:27

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.