From bee99d173e5472ce48b9478c2096140790cc9a53 Mon Sep 17 00:00:00 2001 From: Miles Lott Date: Fri, 13 Apr 2001 05:34:46 +0000 Subject: [PATCH] Add content length setting --- phpgwapi/inc/class.browser.inc.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/phpgwapi/inc/class.browser.inc.php b/phpgwapi/inc/class.browser.inc.php index df20fceb80..ba5e5b3208 100644 --- a/phpgwapi/inc/class.browser.inc.php +++ b/phpgwapi/inc/class.browser.inc.php @@ -221,7 +221,7 @@ } // Echo content headers for file downloads - function content_header($fn="",$mime="application/octetstream",$nocache=True) + function content_header($fn="",$mime="application/octetstream",$length="",$nocache=True) { if ($fn) { @@ -238,6 +238,11 @@ header('Content-disposition:'.$attachment.' filename="'.$fn.'"'); header('Content-type: '.$mime); + if ($length) + { + header("Content-length: ".$length); + } + if ($nocache) { header('Pragma: no-cache');