Steps to recreate:
- go to any database
- click 'Export' tab
- select 'Custom'
- select 'gzipped' from 'Compression'
- press 'Go'
Under:
- Chrome 43.0.2357.81 m - the file is saved as plain text, wrong
- Firefox 38.0.5 - the file is saved az gzipped data, properly
- Opera 29.0.1795.60 - the same as Firefox
OS: Win7 Pro SP1
Confirmed: phpMyAdmin 4.4.8, Windows 8, Chrome 43. In the same environment, behavior is OK under Firefox.
https://github.com/phpmyadmin/phpmyadmin/blob/347dc70c18aa4d036821db3ea379068b338952d8/libraries/core.lib.php#L710...L714 seems to be the cause of the bug.
However, these lines have been added to fix a related bug https://github.com/phpmyadmin/phpmyadmin/commit/ccd65816b8420b5e5239537bb110185d7ac2cace
According to https://code.google.com/p/chromium/issues/detail?id=268085 Chrome has changed how it behaves in such situations. Its gzip encoding hack has been removed for Chrome 43 and above to be in line with Apache 2.4.
So there is no solution that fits all version of Apache or all version of different browsers. I suggest we change our code in 4.5 to be in line with Chrome 43+ and Apache 2.4, hoping that Fireofx will also adopt a similar behavior.
It would be more prudent to implement a solution based on each browser and browser version, if possible.
Fixed with https://github.com/phpmyadmin/phpmyadmin/commit/a39a5ce2656a8a6648985bfbe6ed4aa65ba3b27c