gzip_http_version
nginx 的 gzip 模块中设置的默认值为HTTP 1.1。为什么?使用 gzip 和 HTTP 1.0 有什么问题吗?
nginx gzip_http_version 可以有 HTTP 1.0 并且有它的警告。
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.
Run Code Online (Sandbox Code Playgroud)
更多信息 - http://wiki.nginx.org/HttpGzipModule