Here is the commit for adding HTTP range support. I tested it in late 
versions of Chrome, Firefox, Opera and IE.

https://github.com/satchamo/django/commit/2ce75c5c4bee2a858c0214d136bfcd351fcde11d

The RangedFileReader class may be superfluous but I'm not aware of anything 
in Django or the Python standard library that does something like that.

Feedback appreciated.

On Sunday, April 13, 2014 8:30:37 PM UTC-7, md...@pdx.edu wrote:
>
> Is the Django community interested in supporting HTTP range requests in 
> django.views.static.serve 
> <https://github.com/django/django/blob/master/django/views/static.py>?
>
> The primary benefit I see is that it makes files served up for <video> and 
> <audio> "seek-able" with the django server. This generally isn't a problem 
> for small files (except in Chrome 
> <http://stackoverflow.com/questions/8088364/html5-video-will-not-loop>), 
> but becomes an issue for larger ones.
>
> Werkzeug has a function that parses the range header 
> <https://github.com/mitsuhiko/werkzeug/blob/5eed9385b861a1ae53c03eaae5a8dea4480113d6/werkzeug/http.py#L494>,
>  
> which I used to support range requests in a Django application. I estimate 
> that robust support for HTTP range requests would cost <300 lines of code, 
> plus tests.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-developers+unsubscr...@googlegroups.com.
To post to this group, send email to django-developers@googlegroups.com.
Visit this group at http://groups.google.com/group/django-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/ce048851-9d85-4c94-a152-4e0bd617e815%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to