diff options
Diffstat (limited to 'system/helpers/download_helper.php')
-rw-r--r-- | system/helpers/download_helper.php | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/system/helpers/download_helper.php b/system/helpers/download_helper.php index 09c4de578..2c26a36d5 100644 --- a/system/helpers/download_helper.php +++ b/system/helpers/download_helper.php @@ -95,7 +95,10 @@ if ( ! function_exists('force_download')) } // Clean output buffer - ob_clean(); + if (ob_get_level() !== 0) + { + ob_clean(); + } // Generate the server headers header('Content-Type: '.$mime); @@ -107,14 +110,11 @@ if ( ! function_exists('force_download')) // Internet Explorer-specific headers if (isset($_SERVER['HTTP_USER_AGENT']) && strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE') !== FALSE) { - header('Cache-Control: must-revalidate, post-check=0, pre-check=0'); - header('Pragma: public'); - } - else - { - header('Pragma: no-cache'); + header('Cache-Control: no-cache, no-store, must-revalidate'); } + header('Pragma: no-cache'); + exit($data); } } |