From: Bartosz DziewoƄski Date: Thu, 17 Mar 2016 22:22:00 +0000 (+0100) Subject: SpecialUploadStash: Disable output gzipping when outputting remove scaled thumb X-Git-Tag: 1.31.0-rc.0~7583^2 X-Git-Url: http://git.cyclocoop.org/ecrire?a=commitdiff_plain;h=8eccca254d05772345ed9857a21ebe2817eaf454;p=lhc%2Fweb%2Fwiklou.git SpecialUploadStash: Disable output gzipping when outputting remove scaled thumb This is the only code path that wasn't calling wfResetOutputBuffers() already. All other ones end up in outputLocalFile(), which calls it via StreamFile::prepareForStream(). I can't really tell why this causes Varnish stuff to go bust, but it's definitely the right thing to do anyway. Bug: T130204 Change-Id: Ib6bc9c64c6c893fd7f5a5d906da32d9bee509a98 --- diff --git a/includes/specials/SpecialUploadStash.php b/includes/specials/SpecialUploadStash.php index f2da81f1f2..2e622e1238 100644 --- a/includes/specials/SpecialUploadStash.php +++ b/includes/specials/SpecialUploadStash.php @@ -306,6 +306,8 @@ class SpecialUploadStash extends UnlistedSpecialPage { if ( $size > self::MAX_SERVE_BYTES ) { throw new SpecialUploadStashTooLargeException(); } + // Cancel output buffering and gzipping if set + wfResetOutputBuffers(); self::outputFileHeaders( $contentType, $size ); print $content;