Merge "Improve documentation of $wgShowRollbackEditCount"
[lhc/web/wiklou.git] / includes / OutputHandler.php
index b0bbcdd..39716ca 100644 (file)
@@ -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;