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

Bug #3194 Setting Cache to False blocks downloads
Submitted: 2005-01-13 22:51 UTC
From: elliot at onehouse dot net Assigned: mike
Status: Closed Package: HTTP_Download
PHP Version: 4.3.10 OS: Linux Redhat - 9
Roadmaps: (Not assigned)    
Subscription  


 [2005-01-13 22:51 UTC] elliot at onehouse dot net
Description: ------------ When I set the cache value to false with the setCache method and I attempt to download a file in IE with SP2, the file does not download. If I remove the $dl->setCache(false); line from the code below, the download occurs. Reproduce code: --------------- $sFilePath = $sFilePath . "/" . $sFileName; $dl = &new HTTP_Download(); $dl->setFile($sFilePath); $dl->setContentDisposition( HTTP_DOWNLOAD_ATTACHMENT, rawurldecode($sFileName) ); $dl->guessContentType(); $dl->setCache(false); $dl->send(); Expected result: ---------------- Download would occur. Actual result: -------------- The download dialogue appears and it looks like the file is beginning to download, but then an error message pops up: "Internet Explorer cannot download page.php?dl=45 from 208.36.2.66 Internet Explorer was unable to open this internet site. The requested site is either unavailable or cannot be found. Please try again later"

Comments

 [2005-01-14 07:56 UTC] mike
Have you tried to clear your browser cache?
 [2005-01-14 09:10 UTC] elliot at onehouse dot net
Are you kidding... I feel like I have tried everything. But yes, included in my list of failed debugging attempts is clearing my browser cache. I've narrowed it down to the Pragma header. If it is deleted (by using the setCache(false) method) or set to no-cache, IE6 has problems when trying to download the document. One thing I noticed is that the 'open/download' dialogue shows the parameters list of the downloads webpage instead of the document name (e.g. ?dl=45 instead of doc.pdf).
 [2005-01-14 09:43 UTC] mike
:) Please try latest CVS version.
 [2005-01-14 20:03 UTC] elliot at onehouse dot net
Yep, the change to the cache checking portion of the send method did the trick. Thanks! :)
 [2005-01-14 20:10 UTC] elliot at onehouse dot net
Sorry, forgot to close the bug with my last comment.