我的Apache 2.2 web服务器上configuration了mod_deflate 。 但我的回应标题显示gzip作为Content-Encoding而不是deflate :
HTTP/1.1 200 OK Date: Mon, 26 Sep 2011 22:26:11 GMT Server: Apache Last-Modified: Mon, 26 Sep 2011 11:32:54 GMT Accept-Ranges: bytes X-Powered-By: Servlet/2.5 JSP/2.1 Vary: Accept-Encoding,User-Agent Content-Encoding: gzip Age: 36 Content-Length: 144338 Keep-Alive: timeout=15 Connection: Keep-Alive Content-Type: text/html; charset=UTF-8
注意这一行:
Content-Encoding: gzip
这是正常的吗?
如果你阅读Apache 2.2的mod_deflate文档 ,gzip就在他们身上。 这是mod_deflate使用的压缩和解压缩scheme(通过zlib库)。
“gzip”只是一个CRC-32校验和和一些页眉/页脚信息的DEFLATE 。 你看到的只是模块的function。