Using Internet Explorer 8, Firefox 3.6, Chrome 8 and IIS 7.5 on a Win7 x64 box.
I'm serving up a file using an IHttpHandler (.NET 4).
According to Fiddler, my IIS request from IE8 says it accepts gzip, but it isn't returned:
(note that loc.portal.com is actually 127.0.0.1)
GET http://loc.portal.com/AdminCenter/FileHandler.ashx?ID=115 HTTP/1.1 Accept: application/x-ms-application, image/jpeg, application/xaml+xml, image/gif, image/pjpeg, application/x-ms-xbap, application/x-shockwave-flash, */* Accept-Language: en-US User-Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; MDDR; .NET4.0C; .NET4.0E; MS-RTC LM 8; InfoPath.3) Accept-Encoding: gzip, deflate Connection: Keep-Alive Host: loc.portal.com Cookie: LoginName=; ASP.NET_SessionId=d5qiw5nubkjd2r00gnebg3ar; .ASPXAUTH=BAEA blah blah
Header returned from IIS to IE:
HTTP/1.1 200 OK Cache-Control: private Transfer-Encoding: chunked Content-Type: application/msword Server: Microsoft-IIS/7.5 Content-Disposition: attachment; filename="Roll Worksheet.doc" X-AspNet-Version: 4.0.30319 X-Powered-By: ASP.NET Date: Mon, 24 Jan 2011 20:53:34 GMT
Notice it's not gzipped.
With Firefox, however, the request looks like this:
GET http://loc.portal.com/AdminCenter/FileHandler.ashx?ID=115 HTTP/1.1 Host: loc.portal.com User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.13) Gecko/20101203 Firefox/3.6.13 Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 Accept-Language: en-us,en;q=0.5 Accept-Encoding: gzip,deflate Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7 Keep-Alive: 115 Connection: keep-alive Referer: http://loc.portal.com/sb.cn Cookie: ASP.NET_SessionId=hw104pctkzrdtciwg4ihriqx; .ASPXAUTH=4FBB blah blah
The response, correctly, says it's returning gzip:
HTTP/1.1 200 OK Cache-Control: private Transfer-Encoding: chunked Content-Type: application/msword Content-Encoding: gzip Server: Microsoft-IIS/7.5 Content-Disposition: attachment; filename="Roll Worksheet.doc" X-AspNet-Version: 4.0.30319 X-Powered-By: ASP.NET Date: Mon, 24 Jan 2011 20:55:07 GMT
Chrome looks similar to Firefox. It asks for gzip and gzip is returned. I can see by the content size displayed in Fiddler that the body is, in fact, gzipped for Chrome and Firefox but not IE.
I have "Enable dynamic content compression" (as well as static content compression) set in IIS. My IHttpHandler isn't doing anything special with compression and it's not running different code for different browsers. I searched the source for my project and I don't see any mention of "gzip" at all so I don't see how I could be accidentally mucking with it.
How can I figure out why IIS isn't sending gzipped data to IE?