On the page that I linked to (the .php page), it would appear that the headers are incorrect, yes.
You need to have a breif look over the ones being set to make sure that the application type and file name are being set properly.
As an example, here's my download script I use on my site:
<?php
function send_file($path) {
ob_end_clean();
if (!is_file($path) or connection_status()!=0) return(FALSE);
header("Cache-Control: no-store, no-cache, must-revalidate");
header("Cache-Control: post-check=0, pre-check=0", false);
header("Pragma: no-cache");
header("Expires: ".gmdate("D, d M Y H:i:s", mktime(date("H")+2, date("i"), date("s"), date("m"), date("d"), date("Y")))." GMT");
header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
header("Content-Type: application/octet-stream");
header("Content-Length: ".filesize($path));
header("Content-Disposition: inline; filename=\"".basename($path)."\"");
header("Content-Transfer-Encoding: binary\n");
if ($file = fopen($path, 'rb')) {
set_magic_quotes_runtime(0);
while(!feof($file) and (connection_status()==0)) {
print(fread($file, 1024*8));
flush();
}
fclose($file);
set_magic_quotes_runtime(get_magic_quotes_gpc());
}
return((connection_status()==0) and !connection_aborted());
}
?>
You can see all the headers I set based on the file that's being accessed.
(Also, the script serves up the file as an octet stream in 1K chunks, you may not want this if you're sending image data, as it will force a 'binary' download instead of being able to view it in the browser).
As an example, you can download
this file to see that it works
Jess.