diff --git a/ChangeLog b/ChangeLog index 7bac4ee47e..e45e4f02b7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -8,6 +8,7 @@ phpMyAdmin - ChangeLog - bug #4909 central column with multiple server - bug #4937 Custom export with backquotes off is not working - bug #4908 Reverse proxy: infinite internal redirect (added warning in doc) +- bug #4942 Export to gzip saves plain text under Chrome 4.4.8.0 (2015-05-28) - bug Allow accessing visual query builder when pmadb is not configured diff --git a/libraries/core.lib.php b/libraries/core.lib.php index 4add6f4680..a31f29dbe9 100644 --- a/libraries/core.lib.php +++ b/libraries/core.lib.php @@ -709,7 +709,9 @@ function PMA_downloadHeader($filename, $mimetype, $length = 0, $no_cache = true) header('Content-Type: ' . $mimetype); // inform the server that compression has been done, // to avoid a double compression (for example with Apache + mod_deflate) - if (strpos($mimetype, 'gzip') !== false) { + $notChromeOrLessThan43 = PMA_USR_BROWSER_AGENT != 'CHROME' // see bug #4942 + || (PMA_USR_BROWSER_AGENT == 'CHROME' && PMA_USR_BROWSER_VER < 43); + if (strpos($mimetype, 'gzip') !== false && $notChromeOrLessThan43) { header('Content-Encoding: gzip'); } header('Content-Transfer-Encoding: binary'); diff --git a/libraries/export.lib.php b/libraries/export.lib.php index a345b64744..a8c598cf87 100644 --- a/libraries/export.lib.php +++ b/libraries/export.lib.php @@ -54,10 +54,14 @@ function PMA_gzencodeNeeded() * and gz compression was not asked via $cfg['OBGzip'] * but transparent compression does not apply when saving to server */ + $chromeAndGreaterThan43 = PMA_USR_BROWSER_AGENT == 'CHROME' + && PMA_USR_BROWSER_VER >= 43; // see bug #4942 + if (@function_exists('gzencode') && ((! @ini_get('zlib.output_compression') && ! PMA_isGzHandlerEnabled()) - || $GLOBALS['save_on_server']) + || $GLOBALS['save_on_server'] + || $chromeAndGreaterThan43) ) { return true; } else {