Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 1.1.4

Bug #3192 Downloading with IE SP2 causes file block check
Submitted: 2005-01-13 21:59 UTC
From: elliot at onehouse dot net Assigned:
Status: Bogus Package: HTTP_Download
PHP Version: 4.3.10 OS: Linux - Redhat 9
Roadmaps: (Not assigned)    
Subscription  
Comments Add Comment Add patch


Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know! Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem : 21 - 15 = ?

 
 [2005-01-13 21:59 UTC] elliot at onehouse dot net
Description: ------------ basic description of app: -------------------------- The page I am having problems with has a list of documents to download. The link to download each doc is a link to the same page with the doc id added to the url as a download flag/parameter. (e.g. page.php?dl=45). When the page loads and detects the download parameter in the url, it retrieves the file name and the filepath from the db, and executes the code that I've entered in the "Reproduce Code" section of this bug report. problem: -------------------------- When using Internet Explorer with Service Pack Two installed, the download is blocked with a little explanation message at the top of the browser window. This message comes with an options menu that contains an option to go ahead and download the doc. When clicked, the doc downloads. Reproduce code: --------------- $sFilePath = $sFilePath . "/" . $sFileName; $dl = &new HTTP_Download(); $dl->setFile($sFilePath); $dl->setContentDisposition( HTTP_DOWNLOAD_ATTACHMENT, rawurldecode($sFileName) ); $dl->setContentType('application/x-download'); $dl->send(); Expected result: ---------------- The document would just download without being initially blocked by IE - in the same fashion that downloads from sourceforge.org work. Actual result: -------------- The file download is initially blocked by IE with SP2,explaining that for the user's security the file has been blocked.

Comments

 [2005-01-14 07:58 UTC] mike
Well, what does the message say? Are you talking about word documents?
 [2005-01-14 08:23 UTC] elliot at onehouse dot net
Just figured it out. As it turns out, this is not a bug, but a problem I am having with a new security feature in IE6 with SP2 installed. I wanted to refresh the downloads page (to update an increment counter next to the requested document) and download the document with one click. To achieve this, when a user clicked a doc link to download, the page would accept the doc id in the link, update a counter in the database, and then build the page again, but this time with a refresh meta tag that would again link back to the same page and utilize the PEAR Download class to get the doc. This approach works great in Firefox, but in this scenario, Microsoft deems the doc download action to be automatically generated by the website because it is not the direct result of a key press or mouse click. Automatic downloads are now considered suspect by MS, so IE serves a standard download block message in the title bar (sorry, not sure of the exact wording at this point). The solution is to remove the extra step involving the meta refresh, give up on trying to refresh the page at the same time as downloading the document, and curse Bill's good name - yet again.
 [2006-12-27 04:59 UTC] cellog (Greg Beaver)
bogus