Sending files to MS Internet Explorer with https doesn't work

From: Date: Thu, 15 Aug 2002 15:49:43 +0000
Subject: Sending files to MS Internet Explorer with https doesn't work
Groups: php.dev 
Request: Send a blank email to php-dev+get-86872@lists.php.net to get a copy of this message
I have seen code examples to send files to IE and they work great as long as the connection is not encrypted, but as soon as we switch to https, IE goes back to throwing the same errors. Here is the code. If anyone has a clue how to get this to work over https with IE please let me know. A major project we are working on relies on MS being able to make a browser that works. <?php // sendfile.php $file="word.doc"; header("Cache-control: private"); // work around for IE header("Content-Type: application/octet-stream"); header("Content-Length: ".filesize($file)); header("Content-Disposition: attachment; filename=".$file); $fp = fopen($file, 'r'); fpassthru($fp); fclose($fp); ?> The error message in IE is "Internet Explorer can not download 'sendfile.php?rev=1'" from mydomain.com. Internet Explorer was not able to open this internet site... bla bla bla..." This is the same error you get in IE if you try the above code without the header("Cache-control: private"); so obviously something about the encryption is causing IE problems. work arounds anyone? -- John Lange

« previous php.dev (#86872) next »