Permalink
Browse files

Don' use ob_gzhandler() if zlib.output_compression ini option is set.

  • Loading branch information...
canvural committed Jun 20, 2013
1 parent 8c2b12a commit 8e9563da0ca2c5ea6875bae0c506c2e2d8ea9b9a
Showing with 5 additions and 1 deletion.
  1. +5 −1 src/Munee/Response.php
View
@@ -114,7 +114,11 @@ public function setHeaders()
public function render()
{
$content = $this->assetType->getContent();
if (! $ret = ob_gzhandler($content, PHP_OUTPUT_HANDLER_START | PHP_OUTPUT_HANDLER_END)) {
if (@ini_get('zlib.output_compression')) {
$ret = $content;
}
else if (! $ret = ob_gzhandler($content, PHP_OUTPUT_HANDLER_START | PHP_OUTPUT_HANDLER_END)) {
$ret = $content;
}

0 comments on commit 8e9563d

Please sign in to comment.