-
2005-10-17
In my apache server i have a permanent redirection which redirect all wiki traffic on https.
When i try to download a file (via fetch.php) Firefox works but Explorer not, it reports an error saying that the file is not there.
If i disable https in _media urls it starts working again.
-
2005-10-19
hornet136
I too have the exact same problem.. firefox, konq work fine for me.. just not IE. hitting the page with normal http port 80 traffic works
-
2005-10-20
dekamerone
It's a common problem when dealing with http-Headers in your script (so the webserver itself is not able to fix a long known SSL-incompatibility of Microsoft Internet Explorer).
I solved it by myself in /lib/exe/fetch.php as follows (quick and dirty taken from my PHProjekt code bugfix to Dokuwiki 2005-07-01):
----------------------
//FIXME set sane cachecontrol headers
//FIXME handle conditional and partial requests
//send file
header("Content-Type: $MIME");
header('Last-Modified: '.date('r',filemtime($FILE)));
header('Content-Length: '.filesize($FILE));
header('Cache-Control: must-revalidate, post-check=0, pre-check=0');
header ("Pragma: public"); // [added line]
//application mime type is downloadable
if(substr($MIME,0,11) == 'application'){
header('Content-Disposition: attachment; filename="'.basename($FILE).'";'); // [changed: add ';' at the end]
}
$fp = @fopen($FILE,"rb");
if($fp){
if (filesize($FILE) <= 2000000) { // [added line: bugfix PHP 5.04 fpassthru-Bug]
fpassthru($fp); //does a close itself
} else { // [added line: bugfix PHP 5.04 fpassthru-Bug]
while (strlen($data = fread($fp, 256*1024))) { // [added line: bugfix PHP 5.04 fpassthru-Bug]
echo $data; // [added line: bugfix PHP 5.04 fpassthru-Bug]
} // [added line: bugfix PHP 5.04 fpassthru-Bug]
fclose($fp); // [added line: bugfix PHP 5.04 fpassthru-Bug]
} // [added line: bugfix PHP 5.04 fpassthru-Bug]
}else{
header("HTTP/1.0 500 Internal Server Error");
print "Could not read $FILE - bad permissions?";
}
-----------------
Don't know if that works via http and which of the changed things are really neccessary - but this way it works well.
Happy coding : Michael
-
2005-11-10
Peep
yes, this is a known bug in MSIE - it should be overriden as above
now confirmed it works on HTTPS installation
-
2006-01-06
kubelik
For me, (Apache/2.0.55 (Unix) PHP/4.4.1) bugfix woks fine with
------------------------------------------------
header ("Pragma: public"); // [added line]
//application mime type is downloadable
if(substr($MIME,0,11) == 'application'){
header('Content-Disposition: attachment; filename="'.basename($FILE).'";'); // [changed: add ';' at the end]
}
--------------------------------------------
no other code (as shown above) is needed
-
2006-03-02
andi
suggested fixes were added to devel
-
Related tasks: