下载页面在safari中打断闪存流

I have a simple PHP page for downloading files that contains this code.

header('Content-Type: application/octet-stream');
header('Content-Disposition: attachment; filename="' . $name . '"');
readfile("$file");

This downloads the current bit of music I am listening to in a simple flash player.

For some reason in the latest Safari 4.0 When the download code is executed it interrupts the loading of the song to the flash player.

Basically it makes the flash player act as if it has reached the end of the file and loaded it all.

Kinda hacky, but you could embed a hidden iframe on the page and make the download link use that (href="download.php?filename=something" target="iframe_name"). Like I said, a bit lame, but it (theoretically) would do the trick since you're not redirecting the page technically.