Is there an existing implementation of HTTP byte ranges in Django? I.e. when the client sends a Range: header, I want my Django app to accept that and reply with a HTTP "206 Partial Content" response.

I could write something from scratch, but surely someone has already done this?

There are various parts to this:

  1. Parsing and sanity checking the Range header
  2. Actually generating the ranges
  3. Support for returning a single range in the response
  4. Support for returning multiple ranges in a single response, appropriately MIME encoded

Surely at least (1) and (4) have library support somewhere?

Edit
Report