首页 Nginx 为什么nginx gzip_http_version默认为HTTP 1.1

为什么nginx gzip_http_version默认为HTTP 1.1

nginx的gzip模块中gzip_http_version设置的默认值是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 heade

nginx的gzip模块中gzip_http_version设置的默认值是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.  

更多这里 – http://wiki.nginx.org/HttpGzipModule

本文来自网络,不代表青岛站长网立场。转载请注明出处: https://www.0532zz.com/html/yunying/nginx/20201019/11449.html
上一篇
下一篇

作者: dawei

【声明】:青岛站长网内容转载自互联网,其相关言论仅代表作者个人观点绝非权威,不代表本站立场。如您发现内容存在版权问题,请提交相关链接至邮箱:bqsm@foxmail.com,我们将及时予以处理。

为您推荐

返回顶部