<?xml version="1.0" encoding="UTF-8"?> 
<?xml-stylesheet href="https://dev.horde.org/themes/horde//default/feed-rss.xsl" type="text/xsl"?> 
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"> 
 <channel> 
  <title>gzip/bzip2 upload doubly compressed</title> 
  <pubDate>Thu, 09 Apr 2026 20:04:46 +0000</pubDate> 
  <link>https://bugs.horde.org/ticket/7680</link> 
  <atom:link rel="self" type="application/rss+xml" title="gzip/bzip2 upload doubly compressed" href="https://bugs.horde.org/ticket/7680/rss" /> 
  <description>gzip/bzip2 upload doubly compressed</description> 
 
   
   
  <item> 
   <title>Reproduce method:



- enable &quot;$conf[compress_pages]&quot; in hor</title> 
   <description>Reproduce method:



- enable &quot;$conf[compress_pages]&quot; in horde config

- upload a gzip/bzip2 file in IMP compose window

- send that email to yourself

- open the email you just sent

- download the gzip/bzip2 file to local disk

- the file will be compressed TWICE



Also, independantly of the setting above, any uploaded .tgz (or .tbz) file cannot be

opened in IMP (gives error: &quot;Content type of compressed file: Unknown&quot;)



If I receive an email that contains a .tgz/tbz file (and that email has not been created with IMP), the attached compressed tar file content can be read within IMP, which leads me to believe there is a link with the upload bug above.

</description> 
   <pubDate>Thu, 13 Nov 2008 16:49:39 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/7680#t50727</link> 
  </item> 
   
  <item> 
   <title>&gt; - the file will be compressed TWICE



I can&#039;t reproduce t</title> 
   <description>&gt; - the file will be compressed TWICE



I can&#039;t reproduce this.



&gt; Also, independantly of the setting above, any uploaded .tgz (or .tbz) file cannot be 

&gt; opened in IMP (gives error: &quot;Content type of compressed file: Unknown&quot;)



This is a limitation of the current MIME lib and can&#039;t be fixed until IMP 5.</description> 
   <pubDate>Sun, 16 Nov 2008 22:20:51 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/7680#t50779</link> 
  </item> 
   
  <item> 
   <title>So, are you saying the problem happens with Horde&#039;s MIME lib</title> 
   <description>So, are you saying the problem happens with Horde&#039;s MIME library WHEN UPLOADING the gzipped attachment? Otherwise, If you&#039;re saying it&#039;s only when OPENING the attachment, then it would not explain why this does not happen with an attachment in an email created OUTSIDE of Horde.</description> 
   <pubDate>Sun, 16 Nov 2008 22:44:49 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/7680#t50787</link> 
  </item> 
   
  <item> 
   <title>No. Individual gzipped files are different from tar files.</title> 
   <description>No. Individual gzipped files are different from tar files.</description> 
   <pubDate>Sun, 16 Nov 2008 22:49:08 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/7680#t50788</link> 
  </item> 
   
  <item> 
   <title>&gt; No. Individual gzipped files are different from tar files.</title> 
   <description>&gt; No. Individual gzipped files are different from tar files.



OK, but I really meant &quot;tar.gz&quot; files, not just gzipped files.</description> 
   <pubDate>Sun, 16 Nov 2008 23:54:12 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/7680#t50789</link> 
  </item> 
   
  <item> 
   <title>&gt;&gt; - the file will be compressed TWICE

&gt;

&gt; I can&#039;t reprodu</title> 
   <description>&gt;&gt; - the file will be compressed TWICE

&gt;

&gt; I can&#039;t reproduce this.



I tested again, and it really needs to be a compressed TAR  FILE, not just a compressed FILE.



</description> 
   <pubDate>Mon, 17 Nov 2008 00:03:40 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/7680#t50790</link> 
  </item> 
   
  <item> 
   <title>More details for the problem when trying to view the content</title> 
   <description>More details for the problem when trying to view the content listing of a tar.gz file within IMP:



- a .tar.gz attachment sent using Horde/IMP has a MIME type of &quot;application/x-gzip&quot;

- a .tar.gz attachment sent using Thunderbird has a MIME type of &quot;application/x-compressed-tar&quot;



Which probably explain the problem (and is probably caused by a limitation in the MIME library, as Chuck already mentioned)</description> 
   <pubDate>Mon, 17 Nov 2008 13:29:50 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/7680#t50797</link> 
  </item> 
   
  <item> 
   <title>&gt; - a .tar.gz attachment sent using Horde/IMP has a MIME typ</title> 
   <description>&gt; - a .tar.gz attachment sent using Horde/IMP has a MIME type of 

&gt; &quot;application/x-gzip&quot;



Is this what the browser is sending to Horde/IMP?  We use the MIME type information provided to us by the user&#039;s browser/OS.</description> 
   <pubDate>Sun, 07 Dec 2008 20:41:12 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/7680#t51119</link> 
  </item> 
   
  <item> 
   <title>Since I reported this, I re-installed my OS from scratch, an</title> 
   <description>Since I reported this, I re-installed my OS from scratch, and now I don&#039;t experience the MIME type discrepancy anymore. So it seems there was something mis-configured with the MIME types in my previous environment.



Thanks for this precision, Michael!



&gt;&gt; - a .tar.gz attachment sent using Horde/IMP has a MIME type of

&gt;&gt; &quot;application/x-gzip&quot;

&gt;

&gt; Is this what the browser is sending to Horde/IMP?  We use the MIME 

&gt; type information provided to us by the user&#039;s browser/OS.

</description> 
   <pubDate>Mon, 08 Dec 2008 16:37:01 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/7680#t51154</link> 
  </item> 
   
  <item> 
   <title>Silly me, I tested with a &quot;.tgz&quot; instead of a &quot;.tar.gz&quot;. So </title> 
   <description>Silly me, I tested with a &quot;.tgz&quot; instead of a &quot;.tar.gz&quot;. So the problem is still there, and the &quot;file&quot; command on Linux reports this for a &quot;.tar.gz&quot; file:



# file archive.tar.gz 

archive.tar.gz: gzip compressed data, from Unix, last modified: Mon Dec  8 11:28:54 2008



So it&#039;s probably the right behavior. Can someone confirm?





&gt; Since I reported this, I re-installed my OS from scratch, and now I 

&gt; don&#039;t experience the MIME type discrepancy anymore. So it seems there 

&gt; was something mis-configured with the MIME types in my previous 

&gt; environment.

&gt;

&gt; Thanks for this precision, Michael!

&gt;

&gt;&gt;&gt; - a .tar.gz attachment sent using Horde/IMP has a MIME type of

&gt;&gt;&gt; &quot;application/x-gzip&quot;

&gt;&gt;

&gt;&gt; Is this what the browser is sending to Horde/IMP?  We use the MIME

&gt;&gt; type information provided to us by the user&#039;s browser/OS.

&gt;

</description> 
   <pubDate>Mon, 08 Dec 2008 16:46:59 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/7680#t51156</link> 
  </item> 
   
  <item> 
   <title>Should have done the same test on the &quot;.tgz&quot; file in the pre</title> 
   <description>Should have done the same test on the &quot;.tgz&quot; file in the previous post, but here it is:



# file archive.tgz

archive.tgz: gzip compressed data, from Unix, last modified: Mon Dec  8 11:28:54 2008



Not much of a difference. So where is the MIME type sent to HORDE/IMP coming from?



For a &quot;.tgz&quot;, IMP receives &quot;application/x-gtar&quot; and for a &quot;.tar.gz&quot;, it receives &quot;application/x-gzip&quot;



Can someone shed some light on this?</description> 
   <pubDate>Mon, 08 Dec 2008 16:52:19 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/7680#t51157</link> 
  </item> 
   
  <item> 
   <title>&gt; # file archive.tgz

&gt; archive.tgz: gzip compressed data, f</title> 
   <description>&gt; # file archive.tgz

&gt; archive.tgz: gzip compressed data, from Unix, last modified: Mon Dec  

&gt; 8 11:28:54 2008



And this is correct.  This is a gzip&#039;d file.  How can &#039;file&#039; know what is inside the file without uncompressing it?  &#039;file&#039; simply guess what kind of data is in the file.



&gt; Not much of a difference. So where is the MIME type sent to HORDE/IMP 

&gt; coming from?



The browser/OS.



&gt; For a &quot;.tgz&quot;, IMP receives &quot;application/x-gtar&quot; and for a &quot;.tar.gz&quot;, 

&gt; it receives &quot;application/x-gzip&quot;



Technically, there is nothing wrong with application/x-gzip.  Because that is exactly what the file is.  On OS&#039;s like windows, there can only be a single extension.  So the MIME type &#039;application/x-gzip&#039; is correct.  I realize Thunderbird is sending something different, but I don&#039;t necessarily agree with what they are doing (x-compressed-tar does not seem to be used by many people.).



So I think the previous analysis in this ticket remains.</description> 
   <pubDate>Tue, 09 Dec 2008 05:03:09 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/7680#t51163</link> 
  </item> 
   
  <item> 
   <title>This IS a bug. The clue is in the first post: 

- enable &quot;</title> 
   <description>This IS a bug. The clue is in the first post: 

- enable &quot;$conf[compress_pages]&quot; in horde config

While page compressing is enabled, Imp _shouldn&#039;t_ compress downloaded .gz files. But it does it. Sincerely speaking, I don&#039;t know why it doesn&#039;t compress the other filetypes, I didn&#039;t trace this. But my user complained about &#039;damaged&#039; *.tar.gz files, so I&#039;m returning to this ticket... </description> 
   <pubDate>Wed, 26 Jan 2011 12:30:26 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/7680#t61608</link> 
  </item> 
   
  <item> 
   <title>&gt; - enable &quot;$conf[compress_pages]&quot; in horde config

I&#039;ve a</title> 
   <description>&gt; - enable &quot;$conf[compress_pages]&quot; in horde config

I&#039;ve always had this setting enabled.  And I&#039;ve never seen this problem.

&gt; While page compressing is enabled, Imp _shouldn&#039;t_ compress 
&gt; downloaded .gz files. But it does it.

Then it is not strictly related to this setting.  Because it is completely irrelevant if we compress output to a browser that is already compressed.  It may not be efficient, but there&#039;s absolutely nothing wrong with doing this.

So there must be something different on your server that is causing this issue.  And unless you can track it down and tell us exactly what is causing this, there is nothing us developers can do to help with since it is working fine for us.</description> 
   <pubDate>Wed, 26 Jan 2011 18:02:16 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/7680#t61611</link> 
  </item> 
   
  <item> 
   <title>I&#039;ve investigated the issue in detail and here are my findin</title> 
   <description>I&#039;ve investigated the issue in detail and here are my findings:

The problem model (summary): you are using Imp/Horde and a browser. Horde is configured with $conf[compress_pages] = true. You compose mail message to yourself. The mail message contains an attachment which is tar.gz file. You send the message. You download the attachment from the received message. You find out it doesn&#039;t open. Then you find out it is (gzip) compressed twice (name not changed). You need to investigate what goes on.

1. I used Firefox, MSIE, Chrome and Opera. The attached file was downloaded incorrectly by Firefox and Chrome. It was downloaded correctly by MSIE and Opera. So it&#039;s really not a Horde bug but rather a bug (or unpleasant feature) of Firefox or Chrome.

2. While downloading, you distinguish MSIE from the other browsers. You set Content-Type as application/x-msdownload for MSIE while for other browsers you use Content-Type sent in fact by browser while uploading file (from mail) (in case content type is not known, you use application/octet-stream, which is correct).

3. Firefox and Chrome send Content-Type: application/gzip while uploading an attachment. This is incorrect (application/gzip is not registered by IANA).

4. Firefox and Chrome don&#039;t want to uncompress server data in order to get the correct file. They simply write the stream to disk which is incorrect. In contrary, Opera does it well.

5. Firefox and Chrome correctly save the file when HTTP header shows Content-Type: application/octet-stream (forced by Horde temporary modification in function downloadHeaders in Browser.php)

Looks like Firefox and Chrome get *gz file and save it to disk without further thinking. Opera thinks more and therefore is able to uncompress data before writing file to disk.

So, now we know we are doing our job well but some browsers don&#039;t behave well. The question arises, are we doing our best to circumvent bad browser behavior? Maybe we should always send Content-Type: application/octet-stream to the browser to make it think and doing something more (i.e. uncompress compressed chunks)?</description> 
   <pubDate>Fri, 28 Jan 2011 09:46:38 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/7680#t61654</link> 
  </item> 
   
   
 
 </channel> 
</rss> 
