I'm writing a secure file download system and it works fantastically except for safari users.
I have had several points of feedback saying that when they download a zip file via safari it locates the file and shows that it should start downloading but doesnt, resulting in a 0-filesize zip.
I'm using the code below for the actual download, do you have any idea what could be causing the issue?
The $filename is set earlier in the script but just for arguments sake, lets assume it's, myfiles.zip
$path = "http://www.root.com/".$filename;
header("Cache-Control: must-revalidate, post-check=0, pre-check=0");
header("Content-Description: File Transfer");
header("Content-Type: " . $mm_type);
header("Content-Length: " .(string)(filesize($path)) );
header('Content-Disposition: attachment; filename="'.basename($path).'"');
readfile($path); // outputs the content of the file