<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Content-Encoding != Content-Type</title><link>http://blogs.msdn.com/b/wndp/archive/2006/08/21/content-encoding-not-equal-content-type.aspx</link><description>RFC 2616 for HTTP 1.1 specifies how web servers must indicate encoding transformations using the Content-Encoding header. Although on the surface, Content-Encoding (e.g., gzip, deflate, compress) and Content-Type (e.g., x-application/x-gzip) sound similar</description><dc:language>en-US</dc:language><generator>Telligent Evolution Platform Developer Build (Build: 5.6.50428.7875)</generator><item><title>re: Content-Encoding != Content-Type</title><link>http://blogs.msdn.com/b/wndp/archive/2006/08/21/content-encoding-not-equal-content-type.aspx#10054267</link><pubDate>Wed, 25 Aug 2010 18:43:55 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10054267</guid><dc:creator>Jonathan Rogers</dc:creator><description>&lt;p&gt;This broken &amp;quot;feature&amp;quot; is still present in IE8. If you download a Zip file (Content-Type: application/zip) from Apache and it is also gzip encoded (Content-Encoding: gzip) then the file IE8 saves to disk will still be gzip-encoded, and Windows, Winzip, etc., will not be able to open it.&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10054267" width="1" height="1"&gt;</description></item><item><title>re: Content-Encoding != Content-Type</title><link>http://blogs.msdn.com/b/wndp/archive/2006/08/21/content-encoding-not-equal-content-type.aspx#9501909</link><pubDate>Mon, 23 Mar 2009 20:12:42 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9501909</guid><dc:creator>Stuart Rowan</dc:creator><description>&lt;p&gt;Ari -- thank you for your response. The main reason people are hitting this bug in IE is because they want simple server configuration: just enabling gzip content negotiation site-wide is simple and works with every other browser out there out of the box.&lt;/p&gt;
&lt;p&gt;Without inspecting a zip file one has no way of knowing whether entries in it have been compressed or simply 'stored' ... the compression in a zip file is optional. So there's no right answer as regards 'compressing already compressed content' in the context of application/zip.&lt;/p&gt;
&lt;p&gt;Furthermore, the overhead of gzipping already compressed data is negligible (on current hardware) so whether it's useful to do so or not doesn't really matter.&lt;/p&gt;
&lt;p&gt;Is the hack still present in IE8?&lt;/p&gt;
&lt;p&gt;Which specific group of people / applications benefit from the hack? This was never clear from Billy's original blog post.&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9501909" width="1" height="1"&gt;</description></item><item><title>re: Content-Encoding != Content-Type</title><link>http://blogs.msdn.com/b/wndp/archive/2006/08/21/content-encoding-not-equal-content-type.aspx#9501149</link><pubDate>Mon, 23 Mar 2009 15:44:37 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9501149</guid><dc:creator>Stuart Rowan</dc:creator><description>&lt;P&gt;We're only having to 'pay' because the Internet Explorer team implemented the standard incorrectly.&lt;/P&gt;
&lt;P&gt;Also I think your original post confuses a tarball with a gzipped tarball.&lt;/P&gt;
&lt;P&gt;foo.tar -- plain old tape archive (tar)&lt;/P&gt;
&lt;P&gt;foo.tar.gz / foo.tgz -- plain old tape archive that is then gzipped compressed&lt;/P&gt;
&lt;P&gt;If you receive a document that is Content-Encoded using gzip, you must ungzip it before saving to disk. The fact you IE does this for nearly but not all content is quite bonkers in my opinion.&lt;/P&gt;
&lt;P&gt;An example: Download a zip file from a standards compliant web server. Let's assume the file is called foo.zip&lt;/P&gt;
&lt;P&gt;1. The browser sends a request for the zip file, including an Accept-Encoding: gzip, deflate header&lt;/P&gt;
&lt;P&gt;2. The server sends a response saying various things such as content-length, content-disposition and crucially Content-Encoding: gzip&lt;/P&gt;
&lt;P&gt;3. The browser receives a stream of bytes (a gzipped zip file in fact)&lt;/P&gt;
&lt;P&gt;4. The browser should gunzip the stream and save it to a file (ungzip and save resulting zip file to disk).&lt;/P&gt;
&lt;P&gt;Instead of step 4 above, which chrome, safari, opera and firefox all manage, internet explorer saves the stream in step 3 to foo.zip: in reality Internet Explorer has saved foo.zip.gz to disk but called it foo.zip.&lt;/P&gt;
&lt;P&gt;This means Windows built-in compressed folder widget cannot open the zip file if it is downloaded using IE but can if it is downloaded using any other popular browser.&lt;/P&gt;
&lt;P&gt;In light of the above, do you consider this behaviour of Internet Explorer a feature or a bug?&lt;/P&gt;
&lt;DIV class=commentowner&gt;As Billy mentions, we considered it a compatability hack that we would like to get rid of as soon as possible. However you still might want to consider the usefullness of compressing already compressed content. Also yes you are correct that we are talking about .tar&lt;B&gt;.gz&lt;/B&gt;/.t&lt;B&gt;gz&lt;/B&gt; files (but one of the content-encodings we look for is application/x-tar). --Ari&lt;/DIV&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9501149" width="1" height="1"&gt;</description></item><item><title>re: Content-Encoding != Content-Type</title><link>http://blogs.msdn.com/b/wndp/archive/2006/08/21/content-encoding-not-equal-content-type.aspx#9164476</link><pubDate>Tue, 02 Dec 2008 16:22:17 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9164476</guid><dc:creator>Paul Warren</dc:creator><description>&lt;P&gt;"By setting the Content-Encoding header to "gzip" on a tarball, the server is specifying that it has additionally gzipped the gzipped file. This, of course, is unlikely but not impossible or non-compliant."&lt;/P&gt;
&lt;P&gt;It's not actually that unlikely, and whilst pointless, it is, as you say, compliant. &amp;nbsp;The result of IE's client side hack is to break perfectly compliant web sites, forcing them to implement workarounds for IE's broken "hack".&lt;/P&gt;
&lt;P&gt;We now disable gzip compression for anything other that text/html if the browser identifies itself as IE, because it can't be trusted to get it right on other document types.&lt;/P&gt;
&lt;DIV class=commentowner&gt;I'm sorry that some of us have to pay to deal with other websites and server software that don't handle the protocol right, but considering that most non text content is already compressed (images, video, xml based office document formats) the server setting you did sounds like the right configuration. -- Ari&lt;/DIV&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9164476" width="1" height="1"&gt;</description></item><item><title>re: Content-Encoding != Content-Type</title><link>http://blogs.msdn.com/b/wndp/archive/2006/08/21/content-encoding-not-equal-content-type.aspx#7287404</link><pubDate>Mon, 28 Jan 2008 17:15:12 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:7287404</guid><dc:creator>Vince</dc:creator><description>&lt;p&gt;Doing some archeo here but:&lt;/p&gt;
&lt;p&gt;we just came accross an issue and after a case was open to MS, the official answer is:&lt;/p&gt;
&lt;p&gt;&amp;quot;The Internet Explorer not decompresses only files received with Content-Encoding=GZIP AND with Content-Type like&lt;/p&gt;
&lt;p&gt;&amp;quot;application/x-tar&amp;quot;&lt;/p&gt;
&lt;p&gt;&amp;quot;x-world/x-vrml&amp;quot;&lt;/p&gt;
&lt;p&gt;&amp;quot;application/zip&amp;quot;,&lt;/p&gt;
&lt;p&gt;&amp;quot;application/x-gzip&amp;quot;&lt;/p&gt;
&lt;p&gt;&amp;quot;application/x-zip-compressed&amp;quot;&lt;/p&gt;
&lt;p&gt;&amp;quot;application/x-compress&amp;quot;&lt;/p&gt;
&lt;p&gt;&amp;quot;application/x-compressed&amp;quot;&lt;/p&gt;
&lt;p&gt;&amp;quot;application/x-spoon&amp;quot;&lt;/p&gt;
&lt;p&gt;to not break the behavior to IE 6. This was the reason to hold this behavior.&lt;/p&gt;
&lt;p&gt;We try for consistency with HTTP 1.1 standard, but we can&amp;#180;t give any guaranty that this meet the HTTP 1.1 RFC.&lt;/p&gt;
&lt;p&gt;So it&amp;#180;s better to use a modified Content-type-header to bring the IE to decompress these files.&amp;quot;&lt;/p&gt;
&lt;p&gt;Very nice and not completelly inline with the &amp;quot;philosophy&amp;quot; of the above post...&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=7287404" width="1" height="1"&gt;</description></item><item><title>John&amp;#8217;s blog  &amp;raquo; Blog Archive   &amp;raquo; Why Internet Explorer sometimes saves .tar.gz files like .tar.tar files</title><link>http://blogs.msdn.com/b/wndp/archive/2006/08/21/content-encoding-not-equal-content-type.aspx#748198</link><pubDate>Sun, 10 Sep 2006 02:27:09 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:748198</guid><dc:creator>John’s blog  » Blog Archive   » Why Internet Explorer sometimes saves .tar.gz files like .tar.tar files</dc:creator><description>PingBack from &lt;a rel="nofollow" target="_new" href="http://john.se/blog/2006/09/10/why-internet-explorer-sometimes-saves-targz-files-like-tartar-files/"&gt;http://john.se/blog/2006/09/10/why-internet-explorer-sometimes-saves-targz-files-like-tartar-files/&lt;/a&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=748198" width="1" height="1"&gt;</description></item></channel></rss>