WordPress.org

Make WordPress Core

Ticket #16920: 16920.4.patch

File 16920.4.patch, 3.3 KB (added by hakre, 9 years ago)

Follow-Up to: #11176

  • wp-includes/js/tinymce/wp-tinymce.php

    ### Eclipse Workspace Patch 1.0
    #P wordpress-trunk bare
     
    2727header("Cache-Control: public, max-age=$expires_offset");
    2828
    2929if ( isset($_GET['c']) && 1 == $_GET['c'] && isset($_SERVER['HTTP_ACCEPT_ENCODING'])
    30         && false !== strpos( strtolower($_SERVER['HTTP_ACCEPT_ENCODING']), 'gzip') && ( $file = get_file($basepath . '/wp-tinymce.js.gz') ) ) {
     30        && false !== stripos($_SERVER['HTTP_ACCEPT_ENCODING'], 'gzip') && ( $file = get_file($basepath . '/wp-tinymce.js.gz') ) ) {
    3131
    3232        header('Content-Encoding: gzip');
    3333        echo $file;
  • wp-admin/load-styles.php

     
    134134
    135135if ( $compress && ! ini_get('zlib.output_compression') && 'ob_gzhandler' != ini_get('output_handler') && isset($_SERVER['HTTP_ACCEPT_ENCODING']) ) {
    136136        header('Vary: Accept-Encoding'); // Handle proxies
    137         if ( false !== strpos( strtolower($_SERVER['HTTP_ACCEPT_ENCODING']), 'deflate') && function_exists('gzdeflate') && ! $force_gzip ) {
     137        if ( false !== stripos($_SERVER['HTTP_ACCEPT_ENCODING'], 'deflate') && function_exists('gzdeflate') && ! $force_gzip ) {
    138138                header('Content-Encoding: deflate');
    139139                $out = gzdeflate( $out, 3 );
    140         } elseif ( false !== strpos( strtolower($_SERVER['HTTP_ACCEPT_ENCODING']), 'gzip') && function_exists('gzencode') ) {
     140        } elseif ( false !== stripos($_SERVER['HTTP_ACCEPT_ENCODING'], 'gzip') && function_exists('gzencode') ) {
    141141                header('Content-Encoding: gzip');
    142142                $out = gzencode( $out, 3 );
    143143        }
  • wp-admin/load-scripts.php

     
    129129
    130130if ( $compress && ! ini_get('zlib.output_compression') && 'ob_gzhandler' != ini_get('output_handler') && isset($_SERVER['HTTP_ACCEPT_ENCODING']) ) {
    131131        header('Vary: Accept-Encoding'); // Handle proxies
    132         if ( false !== strpos( strtolower($_SERVER['HTTP_ACCEPT_ENCODING']), 'deflate') && function_exists('gzdeflate') && ! $force_gzip ) {
     132        if ( false !== stripos($_SERVER['HTTP_ACCEPT_ENCODING'], 'deflate') && function_exists('gzdeflate') && ! $force_gzip ) {
    133133                header('Content-Encoding: deflate');
    134134                $out = gzdeflate( $out, 3 );
    135         } elseif ( false !== strpos( strtolower($_SERVER['HTTP_ACCEPT_ENCODING']), 'gzip') && function_exists('gzencode') ) {
     135        } elseif ( false !== stripos($_SERVER['HTTP_ACCEPT_ENCODING'], 'gzip') && function_exists('gzencode') ) {
    136136                header('Content-Encoding: gzip');
    137137                $out = gzencode( $out, 3 );
    138138        }
  • wp-admin/includes/post.php

     
    16141614        $language = $initArray['language'];
    16151615
    16161616        $compressed = $compress_scripts && $concatenate_scripts && isset($_SERVER['HTTP_ACCEPT_ENCODING'])
    1617                 && false !== strpos( strtolower($_SERVER['HTTP_ACCEPT_ENCODING']), 'gzip');
     1617                && false !== stripos($_SERVER['HTTP_ACCEPT_ENCODING'], 'gzip');
    16181618
    16191619        /**
    16201620         * Deprecated