File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 9191 echo $ test_str ;
9292 die;
9393 } elseif ( 2 == $ _GET ['test ' ] ) {
94+ if ( !isset ($ _SERVER ['HTTP_ACCEPT_ENCODING ' ]) )
95+ die ('-1 ' );
9496 if ( false !== strpos ( strtolower ($ _SERVER ['HTTP_ACCEPT_ENCODING ' ]), 'deflate ' ) && function_exists ('gzdeflate ' ) && ! $ force_gzip ) {
9597 header ('Content-Encoding: deflate ' );
9698 $ out = gzdeflate ( $ test_str , 1 );
Original file line number Diff line number Diff line change @@ -127,7 +127,7 @@ function get_file($path) {
127127header ('Expires: ' . gmdate ( "D, d M Y H:i:s " , time () + $ expires_offset ) . ' GMT ' );
128128header ("Cache-Control: public, max-age= $ expires_offset " );
129129
130- if ( $ compress && ! ini_get ('zlib.output_compression ' ) && 'ob_gzhandler ' != ini_get ('output_handler ' ) ) {
130+ if ( $ compress && ! ini_get ('zlib.output_compression ' ) && 'ob_gzhandler ' != ini_get ('output_handler ' ) && isset ( $ _SERVER [ ' HTTP_ACCEPT_ENCODING ' ]) ) {
131131 header ('Vary: Accept-Encoding ' ); // Handle proxies
132132 if ( false !== strpos ( strtolower ($ _SERVER ['HTTP_ACCEPT_ENCODING ' ]), 'deflate ' ) && function_exists ('gzdeflate ' ) && ! $ force_gzip ) {
133133 header ('Content-Encoding: deflate ' );
Original file line number Diff line number Diff line change @@ -137,7 +137,7 @@ function get_file($path) {
137137header ('Expires: ' . gmdate ( "D, d M Y H:i:s " , time () + $ expires_offset ) . ' GMT ' );
138138header ("Cache-Control: public, max-age= $ expires_offset " );
139139
140- if ( $ compress && ! ini_get ('zlib.output_compression ' ) && 'ob_gzhandler ' != ini_get ('output_handler ' ) ) {
140+ if ( $ compress && ! ini_get ('zlib.output_compression ' ) && 'ob_gzhandler ' != ini_get ('output_handler ' ) && isset ( $ _SERVER [ ' HTTP_ACCEPT_ENCODING ' ]) ) {
141141 header ('Vary: Accept-Encoding ' ); // Handle proxies
142142 if ( false !== strpos ( strtolower ($ _SERVER ['HTTP_ACCEPT_ENCODING ' ]), 'deflate ' ) && function_exists ('gzdeflate ' ) && ! $ force_gzip ) {
143143 header ('Content-Encoding: deflate ' );
Original file line number Diff line number Diff line change 11<?php
2+ /**
3+ * Disable error reporting
4+ *
5+ * Set this to error_reporting( E_ALL ) or error_reporting( E_ALL | E_STRICT ) for debugging
6+ */
7+ error_reporting (0 );
28
39$ basepath = dirname (__FILE__ );
410
@@ -20,7 +26,9 @@ function get_file($path) {
2026header ('Expires: ' . gmdate ( "D, d M Y H:i:s " , time () + $ expires_offset ) . ' GMT ' );
2127header ("Cache-Control: public, max-age= $ expires_offset " );
2228
23- if ( isset ($ _GET ['c ' ]) && 1 == $ _GET ['c ' ] && false !== strpos ( strtolower ($ _SERVER ['HTTP_ACCEPT_ENCODING ' ]), 'gzip ' ) && ( $ file = get_file ($ basepath . '/wp-tinymce.js.gz ' ) ) ) {
29+ if ( 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 ' ) ) ) {
31+
2432 header ('Content-Encoding: gzip ' );
2533 echo $ file ;
2634} else {
You can’t perform that action at this time.
0 commit comments