From df489f14df0c6d9d1bb8899662bf253460ca29ca Mon Sep 17 00:00:00 2001 From: nathan Date: Wed, 20 Apr 2022 09:45:15 -0600 Subject: [PATCH] Leave output buffering alone, since trying to turn it off makes the download fail The browser was giving "Failed - Network error" and there was nothing in the server log. ob_get_level() was giving 3, but trying to turn it using ob_end_clean() was just... failing. --- importexport/inc/class.importexport_export_ui.inc.php | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/importexport/inc/class.importexport_export_ui.inc.php b/importexport/inc/class.importexport_export_ui.inc.php index 4f3a382b73..d3ccf8900f 100644 --- a/importexport/inc/class.importexport_export_ui.inc.php +++ b/importexport/inc/class.importexport_export_ui.inc.php @@ -446,18 +446,14 @@ class importexport_export_ui { $appname = $_GET['_appname']; $nicefname = $_GET['filename'] ? $_GET['filename'] : 'egw_export_'.$appname.'-'.date('Y-m-d'); - // Turn off all output buffering - while (@ob_end_clean()); - - $file = fopen($tmpfname,'rb'); - // Get charset $charset = Api\Cache::getSession('importexport', $tmpfname); Api\Header\Content::type($nicefname.'.'.$_GET['_suffix'], ($_GET['_type'] ? $_GET['_type'] : 'application/text') . ($charset ? '; charset='.$charset : ''), filesize($tmpfname)); - fpassthru($file); + + fpassthru($tmpfname); unlink($tmpfname);