X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2FOutputHandler.php;h=39716ca0b4ee7c98824015ece877cce24344b80a;hb=d5212f304fd52a8390e06e1fcc9180a1562588ba;hp=b0bbcddbd33418f98b3f7bc793df1dafcbb26265;hpb=0e4322276a8c6e571c385ee1bbb2e58934136aa0;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/OutputHandler.php b/includes/OutputHandler.php index b0bbcddbd3..39716ca0b4 100644 --- a/includes/OutputHandler.php +++ b/includes/OutputHandler.php @@ -129,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;