this is little hard to explain and I am making stab in the dark here.
There are two systems... test and live (only difference being live is https enabled).
I provide a link like...
d.php?var1=somevar&action=getpdf
.. to provide pdf file for download.
On test everything downloads smoothly.
On LIVE Problem:
When trying to download on live system IE explorer crashes with
Code: Select all
Internet Explorer cannot download ....somevaraction=getpdf (hence removing &..ignoring second var in query string.)
Internet Explorer was not able to open this Internet site. The requested site is either unavailable or cannot be found. Please try again later.http://www.swiftview.com/tech/tests/ie_bugs.htm
I tried putting .pdf at the end of get url...to fake IE MIME in downloading .pdf file....
Now I am thinking as described in bug to not pass second var..but one var through _GET only.
But if this is really the problem. I would guess it should not work on test also...but it does work.
Only difference I see between systems is that live is https.
These are the headers for the file.
Code: Select all
$pdf = 'filename.pdf';
header('Content-type: application/pdf');
header('Pragma: no-cache'); //HTTP 1.0
header('Cache-Control: private, must-revalidate, post-check=0, pre-check=0');
header('Content-Length: ' . filesize($pdf));
header('Content-Description: something');
header('Content-Disposition: inline; filename="save.pdf"');
echo file_get_contents($pdf);If anyone has ever experience such problem or know a possible solution... Please let me know.
P.S. on Opera/FF/Konqueror everything is smoothly running.