Re: HTTP headers, IE and downloading
| From: | Andreas Korthaus | Date: | Mon, 22 Dec 2003 07:48:23 +0000 |
| Subject: | Re: HTTP headers, IE and downloading | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-173135@lists.php.net to get a copy of this message | ||
Hi!
Andreas Magnusson wrote:
> I'm writing a script to view/download an email-attachment. If the file
> happens to be an MS Word document and the browser IE (only tried with
> 6.0), then the download fails.
> If I choose to download (Content-Disposition: attachment;
> filename="whatever.doc") then only a part of the file (2/3) is saved
> to disk. Of course viewing the file doesn't work either. It doesn't
> seem to matter what I set the Content-Type to since IE seems to
> ignore that anyway, however I've tried application/msword,
> application/octet-stream and some others. I've tried all the things
> said in the comments to the header-function in the online-docs at
> php.net.
> I know my Content-Length header is correct and the whole procedure
> works great with Netscape 7.0 and if the attachment is a zip-file or
> a jpeg-image it also works in both IE and Netscape.
Have a look at: http://pear.php.net/package/HTTP_Download
And the first comment of:
http://www.php.net/manual/en/function.session-cache-limiter.php
Perhaps you should not use ouput-compression, and look at the headers
generated by PHP
What headers are sent? Do you use sessions?
you can see this using Mozilla + Live Headers, Ethereal,
http://schroepl.net/cgi-bin/http_trace.pl
...
Regards,
Andreas