apache php - X-SendFile with Byte Range
Asked Answered
C

0

15

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.

Corroboration answered 28/9, 2011 at 7:27 Comment(6)
The module home page says it has support for ranges: tn123.org/mod_xsendfile see Useful? > BenefitsTrivandrum
If it does, why don't you add your comment as an answer? :) @TrivandrumMothering
Because I haven't found a solution for the problem, just the info, that is should be supported.Trivandrum
Was a solution to this ever found?Gaytan
Did you ever figure this out?Nisa
have you tried using the correct content type and not seving it as an attachment/download?Mirella

© 2022 - 2024 — McMap. All rights reserved.