我有一个不太常见的配置(使用IIS的PHP),因此迄今为止,由于这个原因,我无法找到解决我的问题的方法。
基本上,当我在php页面上发送手动404标头时:
header('HTTP/1.0 404 Not Found');
问题在于我总是遇到编码错误,我已经确定这与启用gzip有关。当我使用--compressed选项进行curl时,会出现以下情况:
HTTP/1.1 404 Not Found
Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Pragma: no-cache
Content-Length: 3560
Content-Type: text/html
Content-Encoding: gzip
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Vary: Accept-Encoding
Server: Microsoft-IIS/6.0
Set-Cookie: PHPSESSID=b0ueqhtc3o4p7m2luqss170fr3; path=/
Date: Mon, 11 Jul 2011 16:15:40 GMT
curl: (61) Error while processing content unencoding: invalid code lengths set
是否有可能只针对这一页禁用压缩?还是我错过了其他解决方案?我不想禁用整个站点的压缩。