2014-09-20 10:47:59 +02:00
|
|
|
<?php
|
2011-01-19 18:50:48 +00:00
|
|
|
/**
|
|
|
|
* AJAX checks for zlib.output_compression
|
|
|
|
*
|
|
|
|
* @package Minify
|
|
|
|
*/
|
|
|
|
|
2015-09-28 15:36:52 -04:00
|
|
|
require __DIR__ . '/../bootstrap.php';
|
2014-10-12 16:27:43 +03:00
|
|
|
|
2011-01-19 18:50:48 +00:00
|
|
|
$_oc = ini_get('zlib.output_compression');
|
|
|
|
|
|
|
|
// allow access only if builder is enabled
|
2015-09-28 15:36:52 -04:00
|
|
|
require __DIR__ . '/../config.php';
|
2011-01-19 18:50:48 +00:00
|
|
|
if (! $min_enableBuilder) {
|
|
|
|
header('Location: /');
|
2014-09-20 10:47:59 +02:00
|
|
|
exit;
|
2011-01-19 18:50:48 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
if (isset($_GET['hello'])) {
|
|
|
|
// echo 'World!'
|
|
|
|
|
|
|
|
// try to prevent double encoding (may not have an effect)
|
|
|
|
ini_set('zlib.output_compression', '0');
|
|
|
|
|
|
|
|
HTTP_Encoder::$encodeToIe6 = true; // just in case
|
|
|
|
$he = new HTTP_Encoder(array(
|
2015-09-29 16:29:21 -04:00
|
|
|
'content' => str_repeat('0123456789', 500),
|
|
|
|
'method' => 'deflate',
|
2011-01-19 18:50:48 +00:00
|
|
|
));
|
2014-09-20 10:33:57 +03:00
|
|
|
$he->encode();
|
|
|
|
$he->sendAll();
|
2011-01-19 18:50:48 +00:00
|
|
|
|
|
|
|
} else {
|
|
|
|
// echo status "0" or "1"
|
|
|
|
header('Content-Type: text/plain');
|
|
|
|
echo (int)$_oc;
|
|
|
|
}
|