1
0
mirror of https://github.com/mrclay/minify.git synced 2025-08-31 17:42:02 +02:00

Builder checks encoding problems with bigger response

Fixes #347
This commit is contained in:
Steve Clay
2015-09-29 16:29:21 -04:00
parent 70c0d4b3bf
commit 5f2c54f636
2 changed files with 7 additions and 3 deletions

View File

@@ -187,7 +187,11 @@ by Minify. E.g. <code>@import "<span class=minRoot>/min/?</span>g=css2";</code><
var url = 'ocCheck.php?' + (new Date()).getTime(); var url = 'ocCheck.php?' + (new Date()).getTime();
$.get(url, function (ocStatus) { $.get(url, function (ocStatus) {
$.get(url + '&hello=1', function (ocHello) { $.get(url + '&hello=1', function (ocHello) {
if (ocHello != 'World!') { var expected = [];
for (var i = 0; i < 500; i++) {
expected.push('0123456789');
}
if (ocHello != expected.join('')) {
msg += 'It appears output is being automatically compressed, interfering ' msg += 'It appears output is being automatically compressed, interfering '
+ ' with Minify\'s own compression. '; + ' with Minify\'s own compression. ';
if (ocStatus == '1') if (ocStatus == '1')

View File

@@ -24,8 +24,8 @@ if (isset($_GET['hello'])) {
HTTP_Encoder::$encodeToIe6 = true; // just in case HTTP_Encoder::$encodeToIe6 = true; // just in case
$he = new HTTP_Encoder(array( $he = new HTTP_Encoder(array(
'content' => 'World!' 'content' => str_repeat('0123456789', 500),
,'method' => 'deflate' 'method' => 'deflate',
)); ));
$he->encode(); $he->encode();
$he->sendAll(); $he->sendAll();