From 9119ce8679d393bb71a249f94be6cb78540e3ec0 Mon Sep 17 00:00:00 2001 From: Andy Miller Date: Thu, 10 Mar 2016 10:28:19 -0700 Subject: [PATCH] Should fix download issues with gzip enabled - #723 --- system/src/Grav/Common/Utils.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/system/src/Grav/Common/Utils.php b/system/src/Grav/Common/Utils.php index 9cd5b9b46..6f69480b6 100644 --- a/system/src/Grav/Common/Utils.php +++ b/system/src/Grav/Common/Utils.php @@ -241,6 +241,10 @@ abstract class Utils ignore_user_abort(false); // fix corrupted files + if (Grav::instance()['config']->get('system.cache.gzip')) { + // Flush gzhandler buffer if gzip setting was enabled. + ob_end_clean(); + } ob_clean(); if ($force_download) {