I have Apache 2.2.8 installed on a server, and I'm trying to use X-SendFile
to deliver video files.
Unfortunately some devices, like iPads, seem to require Byte Range
in order to serve the files, but I cannot get Accept-Ranges
to work with X-SendFile
.
Here's the code
header("Content-type: application/octet-stream");
header('Content-Disposition: attachment; filename="' . basename($file_name) . '"');
header('Accept-Ranges: bytes');
header("X-Sendfile: $file_name");
I'd like to avoid the overhead and complexity caused by sending the byte chunks from php.