Byte Ranges in Django [closed]

The are two relevant feature requests (one is open, another is a duplicate of the first):

Both of the issues are based on the Google Group discussion.

The ticket is in a “hanging” state due to architectural concerns and since there is no consensus on whether this is really something that Django should support. Mostly because web-servers are capable of byte serving.

If you are still interested in the implementation, there is a not-yet-reviewed patch sent implementing a special RangedFileReader class for returning the response in chunks using StreamingHttpResponse, there is parsing and sanity checking for HTTP_RANGE header:

You can try out the fork or use the solution as a base of your own.

FYI, there was an another attempt made here – it was not finished, but can be useful to review.


To parse Range header, see:

Leave a Comment