With a little side of applesauce...

Sunday, January 28, 2007

PHP - readfile() fails in IE over HTTPS

Just found that IE 6/7 is unable to download mp3 files over HTTPS while we were setting:


header("Cache-Control: no-cache, must-revalidate");
header("Pragma: no-cache");

readfile($file);

Firefox was downloading files ok, while IE 6/7 would pop open the save as… dialog, and sit at 0% downloading. Once we changed the headers to:


header("Cache-Control: ");
header("Pragma: ");

readfile($file);

IE 6/7 began to download the files correctly. Apparently this IE XML bug:

http://ask.support.microsoft.com/default.aspx?scid=kb;en-us;272359

pertains to any file downloads over HTTPS.

No comments: