jenkins-bot has submitted this change and it was merged.

Change subject: SpecialUploadStash: Disable output gzipping when outputting 
remove scaled thumb
......................................................................


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
(cherry picked from commit 8eccca254d05772345ed9857a21ebe2817eaf454)
---
M includes/specials/SpecialUploadStash.php
1 file changed, 2 insertions(+), 0 deletions(-)

Approvals:
  Alex Monk: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/includes/specials/SpecialUploadStash.php 
b/includes/specials/SpecialUploadStash.php
index f2da81f..2e622e1 100644
--- a/includes/specials/SpecialUploadStash.php
+++ b/includes/specials/SpecialUploadStash.php
@@ -306,6 +306,8 @@
                if ( $size > self::MAX_SERVE_BYTES ) {
                        throw new SpecialUploadStashTooLargeException();
                }
+               // Cancel output buffering and gzipping if set
+               wfResetOutputBuffers();
                self::outputFileHeaders( $contentType, $size );
                print $content;
 

-- 
To view, visit https://gerrit.wikimedia.org/r/278190
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Ib6bc9c64c6c893fd7f5a5d906da32d9bee509a98
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: wmf/1.27.0-wmf.17
Gerrit-Owner: Ori.livneh <[email protected]>
Gerrit-Reviewer: Alex Monk <[email protected]>
Gerrit-Reviewer: Bartosz DziewoƄski <[email protected]>
Gerrit-Reviewer: Florianschmidtwelzow <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to