Feature #48657

support HTTP_RANGE

Added by Simon Schaufelberger over 8 years ago. Updated over 8 years ago.

Under Review
Should have
Target version:
Start date:
Due date:
% Done:


Estimated time:
PHP Version:
Has patch:


Flow has a great HTTP API already but does not yet support HTTP_RANGE which is often/always used on mobile devices. It would be great to serve huge download files with HTTP_RANGE.

See: http://mobiforge.com/developing/story/content-delivery-mobile-devices
"Appendix A: Streaming for Apple iPhone" but note that there are some little errors in that snippet.


Updated by Jacob Floyd over 8 years ago

Whoever codes this, please reference the relevant RFC 2616 sections.

Relevant HTTP stuff (Section numbers from RFC 2616):

Request Headers (5.3):

Response Headers (6.2):

  • Accept-Ranges (14.5)

Entity Headers (7.1):

  • Content-Range (14.16)
    (Content-Length (14.13) is required to use Content-Range)

Response Types:

  • 206 Partial Content (10.2.7)
  • 416 Requested range not satisfiable (10.4.17)

Partial Content Response Misc info:

MediaType multipart/byteranges (19.2) The implementation of this in the referenced appendix on mobiforge only implements single ranges, not multi-ranges
only "needed" response headers need to be sent for ranges (19.6.3 Changes from RFC 2068)


Updated by Alexander Berl over 8 years ago

I just recently fiddled with Range requests and one additional idea that comes into mind with that is, that controllers should be able to return Resource objects, which will then be streamed to the user. That way even large files could be secured through the framework, but be delivered with less memory footprint than simply returning a file_get_contents() by submitting the data in parts.

Only thing that might become tricky to do properly would be multipart byteranges, but not sure when/where those are actually used.


Updated by Gerrit Code Review over 8 years ago

  • Status changed from New to Under Review

Patch set 1 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/21535

Also available in: Atom PDF