We're running into the nasty sporadic IE6 bug where gzip compression enabled on js and css files makes things go bad (see http://stackoverflow.com/questions/1174032/can-i-gzip-compress-all-my-html-contentpages/1174074#1174074 for example).
Therefore, what seems to be the best way to deal with this would be to use the URL Rewrite Module in IIS7/7.5 to check for requests from < IE6 and serve them uncompressed as per http://sebduggan.com/posts/ie6-gzip-bug-solved-using-isapi-rewrite.
- I want to use the IIS7 Url Rewrite Module
- Only the IIS7 Url Rewrite Module 2.0 RC supports rewriting headers
But the following results in a 500 error for the affected resources:
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<rewrite>
<rules>
<rule name="IE56 Do not gzip js and css" stopProcessing="true">
<match url="\.(css|js)" />
<conditions>
<add input="{HTTP_USER_AGENT}" pattern="MSIE\ [56]" />
</conditions>
<action type="None" />
<serverVariables>
<set name="Accept-Encoding" value=".*" /> <!-- This is the problem line -->
</serverVariables>
</rule>
</rules>
</rewrite>
</system.webServer>
What to put in the Server Variable for Accept-Encoding? I've verified that this is the problem line (as everything else has been isolated and operates as required). I've tried everything I can think of and I'm beginning to think that there just isn't support for setting the Accept-Encoding header.
I've tried:
<set name="HTTP_ACCEPT_ENCODING" value=" " />
<set name="HTTP_ACCEPT_ENCODING" value=".*" />
<set name="HTTP_ACCEPT_ENCODING" value="0" />
Specifically, it results in a "HTTP/1.1 500 URL Rewrite Module Error."