3
在Apache中启用gzip压缩时未发送Content-Length?
我非常感谢您对理解Apache行为的一些帮助。 我正在从application / json中的iPhone Objective-C应用程序与PHP通信。Gzip压缩在服务器上启用,并由客户端请求。 从我的.htaccess: AddOutputFilterByType DEFLATE text/html text/plain text/xml application/x-httpd-php application/json 对于较小的请求,Apache会设置“ Content-Length”标头。例如(这些值从标头在Objective-C中输出): Connection = "Keep-Alive"; "Content-Encoding" = gzip; "Content-Length" = 185; <------------- "Content-Type" = "application/json"; Date = "Wed, 22 Sep 2010 12:20:27 GMT"; "Keep-Alive" = "timeout=3, max=149"; Server = Apache; Vary = "Accept-Encoding"; "X-Powered-By" = "PHP/5.2.13"; "X-Uncompressed-Content-Length" …