http/1.0 and deflate/gzip

淺唱寂寞╮ 提交于 2019-12-01 08:42:35

问题


Is http/1.0 able to handle deflated and gzip content? I've finished to implement deflate and gzip in my minimalist web server and I don't really know if browsers with http/1.0 are capable to handle deflate and gzip compressed content.


回答1:


Well really it's down to the browser; not the protocol (HTTP 1.0 does allow for compression quite happily)

You should be examining the Accept-Encoding header, which will either be gzip, deflate. If the header isn't there then don't compress.




回答2:


There appear to be different interpretations of what deflate means. HTTP 1.1 specifies RFC 1950 (zlib) format but IIS produces a raw Deflate stream instead. Internet Explorer cannot handle an RFC 1950 stream - it interprets the deflate Content-Encoding as RFC 1951 - so you may want to avoid that format entirely.

The .NET DeflateStream only implements the Deflate compression algorithm, it does not create the Zlib format.




回答3:


Check out this rather extensive list. (short answer appears to be : Yes they do).



来源:https://stackoverflow.com/questions/239512/http-1-0-and-deflate-gzip

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!