Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Pages: 1
#1 2007-02-24 17:15:54
- guiguibonbon
- Member
- Registered: 2006-02-20
- Posts: 296
file download problem in IE
On this page, when clicking on the download icon in Internet Explorer and choosing to open it, Adobe Reader says “File not found”. Any idea of what is causing this?
Offline
#2 2007-02-24 18:44:36
- els
- Moderator
- From: The Netherlands
- Registered: 2004-06-06
- Posts: 7,458
Re: file download problem in IE
I can open it from IE7. Maybe it’s a setting in Adobe Reader?
Here’s another thread about this problem, apparently not really resolved yet.
Last edited by els (2007-02-24 18:49:00)
Offline
#3 2007-02-25 20:09:00
- zem
- Developer Emeritus
- From: Melbourne, Australia
- Registered: 2004-04-08
- Posts: 2,579
Re: file download problem in IE
It sounds like this is probably caused by an IE 6 caching bug.
Try turning off the Send “Last-Modified” header?
in admin > prefs > advanced > admin and see if it makes a difference.
Alex
Offline
#4 2007-02-25 20:15:38
- zem
- Developer Emeritus
- From: Melbourne, Australia
- Registered: 2004-04-08
- Posts: 2,579
Re: file download problem in IE
On second thoughts: Textpattern doesn’t send Cache-Control headers for file downloads, so that setting won’t make a difference.
Here are the headers sent by your server for that file download:
HTTP/1.x 200 OK
Date: Sun, 25 Feb 2007 20:10:41 GMT
Server: Apache
X-Powered-By: PHP/5.2.1
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Pragma: no-cache
Content-Description: File Download
Content-Length: 268147
content-disposition: attachment; filename="parckdesign.pdf"
Connection: close
Content-Type: application/octet-stream
It’s the Cache-control: no-cache bit that probably causes the problem, as described here.
I don’t think Textpattern is sending that header in this case.
Alex
Offline
#5 2007-02-25 20:24:21
- zem
- Developer Emeritus
- From: Melbourne, Australia
- Registered: 2004-04-08
- Posts: 2,579
Re: file download problem in IE
Try editing textpatter/publish.php around line 131, where you see the header lines, and adding the last line here:
$filesize = filesize($fullpath); $sent = 0;
header('Content-Description: File Download');
header('Content-Type: application/octet-stream');
header('Cache-Control: private'); // add this line
Alex
Offline
#6 2007-02-25 20:34:28
- guiguibonbon
- Member
- Registered: 2006-02-20
- Posts: 296
Re: file download problem in IE
oh, thanks. I’ve found more about it here.
I’m going to try and hack that into the core. It should be added to svn if you ask me (and if it works).
update: yeah, it works great. The only question would be if these headers should only be trigered with pdf and xls files.
edit: ha, you doubled me. I added the following :
header(‘Expires: 0’); header(‘Pragma: cache’); header(‘Cache-Control: private’);
after line 133
Last edited by guiguibonbon (2007-02-25 20:39:32)
Offline
#7 2007-02-25 21:19:58
- zem
- Developer Emeritus
- From: Melbourne, Australia
- Registered: 2004-04-08
- Posts: 2,579
Re: file download problem in IE
G,
Can you confirm whether just the “Cache-Control:private” line by itself is sufficient to fix the problem please?
Alex
Offline
#8 2007-02-25 21:23:39
- guiguibonbon
- Member
- Registered: 2006-02-20
- Posts: 296
Re: file download problem in IE
positive
Offline
#9 2007-02-27 03:02:04
- Mary
- Sock Enthusiast
- Registered: 2004-06-27
- Posts: 6,236
Re: file download problem in IE
Offline
Pages: 1