PHP Content-Length header not working
it has to do with mod_deflate getting in the way. I spent a day messing with .htaccess and trying a million different things, in the end this fixed it but I can't really explain why:
header('Content-Length: '.$filesize);
header("Content-Range: 0-".($filesize-1)."/".$filesize);
I want to add that my PHP was configured with less than 256MB of memory.