Skip to content

Commit

Permalink
Code cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
rhukster committed May 30, 2016
1 parent 7b56041 commit 971c5d3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions system/src/Grav/Common/Grav.php
Original file line number Diff line number Diff line change
Expand Up @@ -127,8 +127,8 @@ public function process()
// Set the header type
$this->header();

// Compress output manually if zlib enabled and close_connection enabled
if ($this['config']->get('system.apache_zlib_fix', false) && $this['config']->get('system.debugger.shutdown.close_connection', true)) {
// Compress output manually if zlib fix required
if ($this['config']->get('system.apache_zlib_fix', false)) {
ob_start();
echo $this->output;
$debugger->render();
Expand Down
4 changes: 2 additions & 2 deletions system/src/Grav/Common/Processors/InitializeProcessor.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ public function process() {
if (ini_get('zlib.output_compression')) {
// disable Grav's gzip option as it conflicts with zlib.output_compression
$this->container['config']->set('system.cache.gzip', false);
// if apache, enable a zlib fix
if (php_sapi_name() === 'apache2handler') {
// if apache + close connection + zlib = set zlib fix = true
if (php_sapi_name() === 'apache2handler' && $this['config']->get('system.debugger.shutdown.close_connection', true)) {
$this->container['config']->set('system.apache_zlib_fix', true);
}
}
Expand Down

0 comments on commit 971c5d3

Please sign in to comment.