开发者

apache php - X-SendFile with Byte Range

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 th开发者_运维技巧e byte chunks from php.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜