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
if ( $size > self::MAX_SERVE_BYTES ) {
throw new SpecialUploadStashTooLargeException();
}
+ // Cancel output buffering and gzipping if set
+ wfResetOutputBuffers();
self::outputFileHeaders( $contentType, $size );
print $content;