mirror of
https://github.com/opensourcepos/opensourcepos.git
synced 2026-04-29 03:15:58 -04:00
Remove content-length header for download
Clean headers (if already output) before force_download
This commit is contained in:
@@ -133,13 +133,14 @@ class Config extends Secure_area
|
||||
{
|
||||
$this->load->dbutil();
|
||||
$prefs = array(
|
||||
'format' => 'txt',
|
||||
'format' => 'zip',
|
||||
'filename' => 'ospos.sql'
|
||||
);
|
||||
|
||||
$backup = $this->dbutil->backup($prefs);
|
||||
$backup =& $this->dbutil->backup($prefs);
|
||||
|
||||
$file_name = 'ospos-' . date("Y-m-d-H-i-s") .'.sql';
|
||||
$file_name = 'ospos-' . date("Y-m-d-H-i-s") .'.zip';
|
||||
$save = 'uploads/'.$file_name;
|
||||
$this->load->helper('download');
|
||||
while (ob_get_level()) {
|
||||
ob_end_clean();
|
||||
|
||||
@@ -86,7 +86,6 @@ if ( ! function_exists('force_download'))
|
||||
header('Cache-Control: must-revalidate, post-check=0, pre-check=0');
|
||||
header("Content-Transfer-Encoding: binary");
|
||||
header('Pragma: public');
|
||||
header("Content-Length: ".strlen($data));
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -95,7 +94,6 @@ if ( ! function_exists('force_download'))
|
||||
header("Content-Transfer-Encoding: binary");
|
||||
header('Expires: 0');
|
||||
header('Pragma: no-cache');
|
||||
header("Content-Length: ".strlen($data));
|
||||
}
|
||||
exit($data);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user