加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 运营中心 > Nginx > 正文

为什么nginx gzip_http_version默认为HTTP 1.1

发布时间:2020-12-13 21:09:07 所属栏目:Nginx 来源:网络整理
导读: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. Asth

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

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读