为什么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 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.f2er.com/nginx/435113.html

猜你在找的Nginx相关文章