Merge "Provide VRS objects with a name for more informative debugging/logging"
[lhc/web/wiklou.git] / includes / OutputHandler.php
index b3b3b88..c6209ee 100644 (file)
  * @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;
                }