Home Dashboard Directory Help
Search

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


Status: 

Closed
 as Fixed Help for as Fixed


27
0
Sign in
to vote
Type: Bug
ID: 758474
Opened: 8/17/2012 3:10:28 AM
Access Restriction: Public
0
Workaround(s)
view
15
User(s) can reproduce this bug

Description

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.



Details
Sign in to post a comment.
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:

https://51degrees.mobi/Support/Documentation/NET/IISModification.aspx
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.

https://developers.google.com/webmasters/smartphone-sites/redirects
Posted by Dima2 on 11/20/2012 at 8:57 PM
Related questions on stackoverflow:
http://stackoverflow.com/questions/5372052/iis-compression-module-and-vary-accept-encoding-header
http://stackoverflow.com/questions/11206810/vary-header-when-content-is-not-gziped-on-iis-7-as-origin-for-cdn
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)
Sign in to post a workaround.
File Name Submitted By Submitted On File Size  
web.zip 7/1/2013 7 KB