Brion Vibber:
Rene Pijlman:
When I request a normal article anonymously with
the cache
enabled, my browser shows gibberish (Firefox) or a download
dialog (IE)
Did you disable the generic gzipping at the top of LocalSettings.php
like I said was necessary in my previous mail?
Oh waitaminute, you're referring to this I guess:
if( !ini_get( 'zlib.output_compression' ) ) ob_start(
'ob_gzhandler' );
I completely overlooked that. Indeed, when I remove this line
and configure file caching like this:
$wgUseFileCache = true;
$wgFileCacheDirectory = "/home/rene/projects/carriere/cache";
$wgShowIPinHeader = false;
$wgUseGzip = true;
... it works fine. Files in the cache are compressed and both
Firefox and IE render pages correctly.
Thanks again for your help Brion.
If I'm not mistaken the cause of the problem was that both
ob_gzhandler and the file cache were compressing the output, so
it was compressed two times, which would explain the problem I
saw.
May I suggest to fix this in the code, to make configuration
easier?
I'd say that when PHP provides the mechanism for output
compression over the wire, there's no reason to duplicate this
mechanism in the file cache. You might as well completely remove
compression from the file cache and cache uncompressed on disk.
At the cost of some extra disk space this will improve
performance of the file cache (no CPU cycles for
(un)compression) and simplify the code. This will neatly
separate caching from compression.
Would it help if I implement and test this and submit a patch?
--
Regards / Groeten,
http://www.leren.nl
René Pijlman
http://www.applinet.nl