I have an IIS 7.5 server configured with PHP 5.4.5 running through FastCgi. PHP is configured to return gzip encoded data if the client supports it.
My problem is when I issue a 303 See Other header from PHP, IIS is sticking some HTML before the gzip encoded data. For most browsers this isn't a problem they just follow the headers, however my clients are reporting that the redirects don't work through their Cisco Scansafe proxy, and I think this might be the reason.
Here's the packet data captured with Wireshark:
GET / HTTP/1.1
Host: [OMITTED]
Connection: keep-alive
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/37.0.2062.124 Safari/537.36
Accept-Encoding: gzip,deflate
Accept-Language: en-GB,en-US;q=0.8,en;q=0.6
Cookie: PHPSESSID=[OMITTED]
HTTP/1.1 303 See Other
Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Pragma: no-cache
Content-Type: text/html; charset=UTF-8
Content-Encoding: gzip
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Location: http://[OMITTED]/reports/
Vary: Accept-Encoding
Server: Microsoft-IIS/7.5
X-Powered-By: ASP.NET
Date: Fri, 10 Oct 2014 08:15:16 GMT
Content-Length: 246
<head><title>Document Moved</title></head>
<body><h1>Object Moved</h1>This document may be found <a HREF="http://[OMITTED]/reports/">here</a></body>......4....I..(.M.U.OF-.O..K./J-./S.+.(0U.s.....+S..O............5,...
The gzip encoded bytes do decode by themselves and have the content that was output by PHP, but with the IIS HTML is the way the overall HTTP packet won't decode properly, which may be triggering it's rejection by Scansafe.
How can I tell IIS to stop doing this?