X-Git-Url: http://git.cyclocoop.org/?a=blobdiff_plain;f=includes%2FOutputHandler.php;h=39716ca0b4ee7c98824015ece877cce24344b80a;hb=1d41a1a7345c38a87c047f06c5f75d3dace43a29;hp=b3b3b889a70aef50030ab3dc886d128afc5d07cf;hpb=67ad578c427345edab90f86579167f8fd0cfb7ae;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/OutputHandler.php b/includes/OutputHandler.php index b3b3b889a7..39716ca0b4 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,16 +129,17 @@ 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; } } if ( !$foundVary ) { header( 'Vary: Accept-Encoding' ); - global $wgUseXVO; - if ( $wgUseXVO ) { - header( 'X-Vary-Options: Accept-Encoding;list-contains=gzip' ); + global $wgUseKeyHeader; + if ( $wgUseKeyHeader ) { + header( 'Key: Accept-Encoding;match=gzip' ); } } return $s;