WordPress.org

Make WordPress Core

Changeset 17630


Ignore:
Timestamp:
04/11/11 18:55:11 (3 years ago)
Author:
ryan
Message:

Use stripos() instead of strpos( strtolower() ). Props hakre. see #16920

Location:
trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/includes/post.php

    r17625 r17630  
    16161616 
    16171617    $compressed = $compress_scripts && $concatenate_scripts && isset($_SERVER['HTTP_ACCEPT_ENCODING']) 
    1618         && false !== strpos( strtolower($_SERVER['HTTP_ACCEPT_ENCODING']), 'gzip'); 
     1618        && false !== stripos($_SERVER['HTTP_ACCEPT_ENCODING'], 'gzip'); 
    16191619 
    16201620    /** 
  • trunk/wp-admin/load-scripts.php

    r17609 r17630  
    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 ); 
  • trunk/wp-admin/load-styles.php

    r12878 r17630  
    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 ); 
  • trunk/wp-includes/js/tinymce/wp-tinymce.php

    r14765 r17630  
    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'); 
Note: See TracChangeset for help on using the changeset viewer.