bug #1123284, avoid double compression when zlib.output_compression is On

This commit is contained in:
Marc Delisle
2005-05-02 16:39:40 +00:00
parent f0348780fa
commit 40e3d502af
2 changed files with 11 additions and 3 deletions

View File

@@ -5,6 +5,10 @@ phpMyAdmin - Changelog
$Id$
$Source$
2005-05-02 Marc Delisle <lem9@users.sourceforge.net>
* export.php: bug #1123284, avoid double compression when
zlib.output_compression is On, thanks to unclef at users.sourceforge.net
2005-05-01 Marc Delisle <lem9@users.sourceforge.net>
* server_status.php: bug #1193225, missing </ul>
* tbl_properties.inc.php: bug #1193353, js error on creating table

View File

@@ -248,9 +248,13 @@ if ($asfile) {
$mime_type = 'application/x-bzip2';
} else if (isset($compression) && $compression == 'gzip') {
$filename .= '.gz';
// needed to avoid recompression by server modules like mod_gzip:
$content_encoding = 'x-gzip';
$mime_type = 'application/x-gzip';
// Needed to avoid recompression by server modules like mod_gzip.
// It seems necessary to check about zlib.output_compression
// to avoid compressing twice
if (!@ini_get('zlib.output_compression')) {
$content_encoding = 'x-gzip';
$mime_type = 'application/x-gzip';
}
} else if (isset($compression) && $compression == 'zip') {
$filename .= '.zip';
$mime_type = 'application/zip';