From a7dfa5da711c337f61333f17a6cb737147e1a09b Mon Sep 17 00:00:00 2001 From: Brion Vibber Date: Mon, 11 Dec 2006 01:51:21 +0000 Subject: * (bug 8148) Handle non-removable output buffers gracefully when cleaning buffers for HTTP 304 responses, StreamFile, and Special:Export. Duplicated code merged into wfResetOutputBuffers() and wfClearOutputBuffers() --- includes/StreamFile.php | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'includes/StreamFile.php') diff --git a/includes/StreamFile.php b/includes/StreamFile.php index 641826986240..949422d6912e 100644 --- a/includes/StreamFile.php +++ b/includes/StreamFile.php @@ -22,12 +22,7 @@ function wfStreamFile( $fname ) { header( 'Last-Modified: ' . gmdate( 'D, d M Y H:i:s', $stat['mtime'] ) . ' GMT' ); // Cancel output buffering and gzipping if set - while( $status = ob_get_status() ) { - ob_end_clean(); - if( $status['name'] == 'ob_gzhandler' ) { - header( 'Content-Encoding:' ); - } - } + wfResetOutputBuffers(); $type = wfGetType( $fname ); if ( $type and $type!="unknown/unknown") { -- cgit v1.2.3