[dev] IE and download problems
Leena Heino
Leena.Heino@uta.fi
Mon, 30 Sep 2002 20:24:54 +0300 (EEST)
On Mon, 30 Sep 2002, Michael M Slusarz wrote:
> This patch is not entiretly correct IMHO. It appears we are running into
> something that Microsoft actually fixed, namely the Content-Disposition bug
> present in IE 5.5. Jan reported this here (that it was fixed in IE 5.5 SP
> 2):
> http://lists.horde.org/archives/dev/Week-of-Mon-20010924/003381.html
You are right, upon further testing the patch did not work. Attached to
this mai is corrected patch.
It seems that the download attachment works quite nicely if using http,
but using https everything goes wrong and download fails. This has been
tested with IE 5.5sp2 and IE 6sp1.
There's a Microsoft knowledge base article about the subject:
http://support.microsoft.com/default.aspx?scid=kb;EN-US;q316431
In which it says that if downloading files and using headers:
Pragma: no-cache
Cache-control: no-cache,max-age=0,must-revalidate
The file won't be saved to IE's cache and therefore IE will show some very
cryptic error message.
Here's some additional information about Pragma: no-cache in php's manual:
http://php3.de/manual/en/printwn/function.session-cache-limiter.php
Here's the patch. This patch has been tested with Netscape 4.79,
IE 5.5sp2, IE 6sp1 and Mozilla 1.1.
--- imp/view.php.orig Mon Sep 30 18:05:35 2002
+++ imp/view.php Mon Sep 30 20:17:18 2002
@@ -55,6 +55,7 @@
* things work. I don't really want to know. */
if ($browser->hasQuirk('break_disposition_header')) {
header('Content-Disposition: filename=' . MIME::decode($mime->name));
+ header("Pragma: public");
} else {
header('Content-Disposition: attachment; filename=' . MIME::decode($mime->name));
}
--
-- Leena Heino (liinu at uta.fi)