Changeset 43618
- Timestamp:
- 09/03/2018 09:16:27 PM (6 years ago)
- Location:
- branches/4.9
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/4.9
-
branches/4.9/src/wp-admin/load-scripts.php
r38470 r43618 29 29 require( ABSPATH . WPINC . '/version.php' ); 30 30 31 $compress = ( isset($_GET['c']) && $_GET['c'] );32 $force_gzip = ( $compress && 'gzip' == $_GET['c'] );33 31 $expires_offset = 31536000; // 1 year 34 32 $out = ''; … … 59 57 header("Cache-Control: public, max-age=$expires_offset"); 60 58 61 if ( $compress && ! ini_get('zlib.output_compression') && 'ob_gzhandler' != ini_get('output_handler') && isset($_SERVER['HTTP_ACCEPT_ENCODING']) ) {62 header('Vary: Accept-Encoding'); // Handle proxies63 if ( false !== stripos($_SERVER['HTTP_ACCEPT_ENCODING'], 'deflate') && function_exists('gzdeflate') && ! $force_gzip ) {64 header('Content-Encoding: deflate');65 $out = gzdeflate( $out, 3 );66 } elseif ( false !== stripos($_SERVER['HTTP_ACCEPT_ENCODING'], 'gzip') && function_exists('gzencode') ) {67 header('Content-Encoding: gzip');68 $out = gzencode( $out, 3 );69 }70 }71 72 59 echo $out; 73 60 exit; -
branches/4.9/src/wp-admin/load-styles.php
r38470 r43618 29 29 exit; 30 30 31 $compress = ( isset($_GET['c']) && $_GET['c'] );32 $force_gzip = ( $compress && 'gzip' == $_GET['c'] );33 31 $rtl = ( isset($_GET['dir']) && 'rtl' == $_GET['dir'] ); 34 32 $expires_offset = 31536000; // 1 year … … 81 79 header("Cache-Control: public, max-age=$expires_offset"); 82 80 83 if ( $compress && ! ini_get('zlib.output_compression') && 'ob_gzhandler' != ini_get('output_handler') && isset($_SERVER['HTTP_ACCEPT_ENCODING']) ) {84 header('Vary: Accept-Encoding'); // Handle proxies85 if ( false !== stripos($_SERVER['HTTP_ACCEPT_ENCODING'], 'deflate') && function_exists('gzdeflate') && ! $force_gzip ) {86 header('Content-Encoding: deflate');87 $out = gzdeflate( $out, 3 );88 } elseif ( false !== stripos($_SERVER['HTTP_ACCEPT_ENCODING'], 'gzip') && function_exists('gzencode') ) {89 header('Content-Encoding: gzip');90 $out = gzencode( $out, 3 );91 }92 }93 94 81 echo $out; 95 82 exit;
Note: See TracChangeset
for help on using the changeset viewer.