IIS: gzip compression filter removes pre-existing vary: header - by Eamon Nerbonne

Status : 

  Fixed<br /><br />
		This item has been fixed in the current or upcoming version of this product.<br /><br />
		A more detailed explanation for the resolution of this particular item may have been provided in the comments section.

Sign in
to vote
ID 758474 Comments
Status Closed Workarounds
Type Bug Repros 15
Opened 8/17/2012 3:10:28 AM
Access Restriction Public


If the gzip-compression filter module is enabled for a request, it replaces the "Vary:" header with "Vary: Accept-Encoding"

However, this causes clients to incorrectly used cached responses when the request is significantly different.

For example, Vary: Accept or Vary: Accept-Language will be removed with the result that the cached response may be in the wrong format or language.

Sign in to post a comment.
Posted by Dima2 on 3/31/2015 at 7:46 PM
The hotfix is not available. I requested it many times and get a broken link in the email (404). Can someone look at this issue please? It has been over a year.
Posted by hakunamatatabwana on 2/25/2014 at 10:33 PM
I requested the HOTFIX but the link for Windows 2012 sends you to page that suggests "The resource you are looking for has been removed, had its name changed, or is temporarily unavailable.". Has this HOTFIX been removed by Microsoft?
Posted by Erez Benari on 12/17/2013 at 3:18 PM
This issue is now addressed by an official patch to IIS. To download and further info, visit http://support.microsoft.com/kb/2877816

Erez Benari, IIS PM
Posted by DoctorTommasus on 7/18/2013 at 9:26 AM
We at 51Degrees.mobi have made two native modules for IIS that works around this issue and restores the vary header:

Posted by 51degrees.mobi on 7/1/2013 at 2:06 AM
We've also seen the same behavior in IIS8.

This bug makes it impossible to compress content (particularly important for mobile) and implement Google's requirements for serving different content on the same URL for mobile. See the following URL.

Posted by Dima2 on 11/20/2012 at 8:57 PM
Related questions on stackoverflow:
Posted by Dima2 on 11/20/2012 at 8:50 PM
Overwriting Vary header seems very illogical, response can be varied (no pun intended) based on other factors like User Agent, presence of a certain cookie, or some other custom logic.

Sites that serve mobile and desktop content from the same URL have to include 'User-Agent' into Vary header to make sure that caching servers will not serve mobile content to desktop clients and vice versa. This value is also taken into account by google crawlers: https://developers.google.com/webmasters/smartphone-sites/details
Posted by SnowDog111 on 10/27/2012 at 3:41 PM
This also stops Mobile Sites being operated on the same URL as Classic Web sites - as the remote end does not know that the content vary based on User-Agent, Cookie

This is bad.

Please Use Append Header for the compression (microsoft) rather than overwrite and everyone will be happy
Posted by DiegoNyLa on 8/31/2012 at 9:01 AM
This is definitely and issue in IIS 7 and IIS 7.5, and seems irrespective of the operating system used. I can reproduce it in Windows Server 2008 also.
Posted by Microsoft on 8/19/2012 at 10:42 PM
Thanks for your feedback.

We are rerouting this issue to the appropriate group within the Visual Studio Product Team for triage and resolution. These specialized experts will follow-up with your issue.
Posted by Microsoft on 8/17/2012 at 3:51 AM
Thank you for your feedback, we are currently reviewing the issue you have submitted. If this issue is urgent, please contact support directly(http://support.microsoft.com)