[Tickets #11180] Re: gzip attachments get double gzip on download

bugs at horde.org bugs at horde.org
Thu May 10 00:43:53 UTC 2012


DO NOT REPLY TO THIS MESSAGE. THIS EMAIL ADDRESS IS NOT MONITORED.

Ticket URL: http://bugs.horde.org/ticket/11180
------------------------------------------------------------------------------
  Ticket             | 11180
  Updated By         | patrickdk at patrickdk.com
  Summary            | gzip attachments get double gzip on download
  Queue              | IMP
  Version            | Git master
  Type               | Bug
  State              | Not A Bug
  Priority           | 2. Medium
  Milestone          |
  Patch              |
  Owners             |
------------------------------------------------------------------------------


patrickdk at patrickdk.com (2012-05-10 00:43) wrote:

The data is not compressed a 3rd time, and I'm using lighttpd without  
the compression module (the compression module doesn't support  
compression of dynamic content, only static files anyways)

a tcpdump of the stream shows double compression:

HTTP/1.1 200 OK
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Pragma: no-cache
Content-Type: application/x-gzip
Content-Disposition: attachment; filename="test1.tar.gz"
Content-Encoding: gzip
Vary: Accept-Encoding
Transfer-Encoding: chunked
Date: Wed, 09 May 2012 22:01:17 GMT
Server: lighttpd/1.4.30

fff8
....................X.O..test1.tar...y<.}.?.OI.$d..(E.b.:mHN..b*.c".

compared to the real file:

_KHHOX)O at Ctest1.tar@l}y<T}{?LOIR$dO)(ERbI:mH

If I disable compress in horde config, all is fine, and everything  
works, but all pages are uncompressed, html/js/css/...

The same issue on my apache config, if I disable horde compression,  
and only use the deflate module, I get compression, plus downloads of  
the gzip attachment work properly.

Seems to be this firefox bug, I suppose:
https://bugzilla.mozilla.org/show_bug.cgi?id=610679

As long as content-encoding isn't in use, on gzip'd files, it's not an  
issue, and since mod_deflate isn't compressing already gzip content,  
it works.

Also while looking at a workaround for this, I found that the  
imp/view.php appInit nocompress option isn't used, cause the  
services/download/index.php overrides it.

I added:
'nocompress' => ((Horde_Util::getFormData('actionID') ==  
'download_all') || Horde_Util::getFormData('zip')  
||(substr_compare(Horde_Util::getFormData('fn'), 'gz', -2, 2,true)  
==0)),
do services/download/index.php appInit as a simple workaround.

The other workaround would be to completely disable hordes buildin  
compression, and use browser based compression instead, but lighttpd  
currently doesn't support that for php.






More information about the bugs mailing list