X-Git-Url: http://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2FOutputHandler.php;h=c6209eebcfbb47ea77b3dabe2d295ba7aaca954a;hb=e7c9096ecc084bb81a99d3acc949c32b0ef49d56;hp=c783fd3344c78b4df4380ad716595385988f8ce3;hpb=de31b2474e29fe2f2eea6648b83d01ee53a726b7;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/OutputHandler.php b/includes/OutputHandler.php index c783fd3344..c6209eebcf 100644 --- a/includes/OutputHandler.php +++ b/includes/OutputHandler.php @@ -28,8 +28,10 @@ * @return string */ function wfOutputHandler( $s ) { - global $wgDisableOutputCompression, $wgValidateAllHtml; - $s = wfMangleFlashPolicy( $s ); + global $wgDisableOutputCompression, $wgValidateAllHtml, $wgMangleFlashPolicy; + if ( $wgMangleFlashPolicy ) { + $s = wfMangleFlashPolicy( $s ); + } if ( $wgValidateAllHtml ) { $headers = headers_list(); $isHTML = false; @@ -127,7 +129,8 @@ function wfGzipHandler( $s ) { $headers = headers_list(); $foundVary = false; foreach ( $headers as $header ) { - if ( substr( $header, 0, 5 ) == 'Vary:' ) { + $headerName = strtolower( substr( $header, 0, 5 ) ); + if ( $headerName == 'vary:' ) { $foundVary = true; break; } @@ -164,7 +167,10 @@ function wfMangleFlashPolicy( $s ) { * @param int $length */ function wfDoContentLength( $length ) { - if ( !headers_sent() && isset( $_SERVER['SERVER_PROTOCOL'] ) && $_SERVER['SERVER_PROTOCOL'] == 'HTTP/1.0' ) { + if ( !headers_sent() + && isset( $_SERVER['SERVER_PROTOCOL'] ) + && $_SERVER['SERVER_PROTOCOL'] == 'HTTP/1.0' + ) { header( "Content-Length: $length" ); } }