When i make an OpenDocument file for download over https site, IE doesn't download the file. This seems to be an IE bug with cahce header over https.
The solution is to use this php code to reset cahe and pragma headers:
header("Pragma: ");
header("Cache-Control: ");
|
I don't known much of cache and pragma headers to say that this workaround it's correct also for other browser. But with this modify at source code of tbs_plugin_opentbs.php (from line 3119 of version 1.7.5) the download works corectly with all browsers on https site:
$user_agent = strtolower ($_SERVER["HTTP_USER_AGENT"]);
if ((is_integer (strpos($user_agent, "msie"))) && (is_integer (strpos($user_agent, "win")))) {
header("Pragma: ");
header("Cache-control: ");
header('Content-Disposition: filename="'.$File.'"');
} else {
header('Expires: 0');
header('Cache-Control: must-revalidate, post-check=0, pre-check=0');
header('Cache-Control: public');
header("Pragma: no-cache"); // HTTP/1.0
header("Cache-control: private"); // <= it's magical!!
header('Content-Disposition: attachment; filename="'.$File.'"');
}
//header ('Pragma: no-cache');
if ($ContentType!='') header ('Content-Type: '.$ContentType);
/*header('Content-Disposition: attachment; filename="'.$File.'"');
header('Expires: 0');
header('Cache-Control: must-revalidate, post-check=0, pre-check=0');
header('Cache-Control: public');*/
header('Content-Description: File Transfer');
header('Content-Transfer-Encoding: binary');
$Len = $this->_EstimateNewArchSize();
if ($Len!==false) header('Content-Length: '.$Len);
|
I also substitute the headers for other browsers with that i have found for other downloads on my code.
If you want to include this code (or similar) to opentbs source code you can make download working better.
Thanks for reading