1
0
mirror of https://github.com/mrclay/minify.git synced 2025-09-06 12:10:45 +02:00

3 Commits
3.0.2 ... 3.0.3

Author SHA1 Message Date
Elan Ruusamäe
404664509c fill 3.0.3 release notes 2017-11-03 23:00:15 +02:00
Elan Ruusamäe
9ed7f9dc24 Fix closure-compiler's error "redirection limit reached". fixes #618, #619 2017-11-03 22:58:09 +02:00
Emanuele "ToX" Toscano
d9b392c474 Fix closure-compiler's "redirection limit reached"
Since a few days, the js minification was complaining about a redirection limit in the closure-compiler call. This was generating an error each time I have tried to use this tool.

After a bit of investigation I have found out that it was missing some parameters that are now mandatory. Plus, it now works in https only.
2017-11-03 10:24:25 +01:00
2 changed files with 8 additions and 1 deletions

View File

@@ -1,3 +1,7 @@
## Version 3.0.3 (2017-11-03)
* Fix closure-compiler's error "redirection limit reached". #618, #619
## Version 3.0.2 (2017-09-14)
* Fixes syntax error in Groups controller, #613

View File

@@ -54,7 +54,7 @@ class Minify_JS_ClosureCompiler
/**
* @var string $url URL of compiler server. defaults to Google's
*/
protected $serviceUrl = 'http://closure-compiler.appspot.com/compile';
protected $serviceUrl = 'https://closure-compiler.appspot.com/compile';
/**
* @var int $maxBytes The maximum JS size that can be sent to the compiler server in bytes
@@ -174,6 +174,9 @@ class Minify_JS_ClosureCompiler
$contents = file_get_contents($this->serviceUrl, false, stream_context_create(array(
'http' => array(
'method' => 'POST',
'compilation_level' => 'SIMPLE',
'output_format' => 'text',
'output_info' => 'compiled_code',
'header' => "Content-type: application/x-www-form-urlencoded\r\nConnection: close\r\n",
'content' => $postBody,
'max_redirects' => 0,