On Thu, Mar 24, 2011 at 9:40 PM, Kristaps Kūlis
<kristaps.ku...@gmail.com> wrote:
> I wish to note that Nginx implements this feature differently than
> LigHTTPd and Apache2
> http://wiki.nginx.org/XSendfile ,
>
> Should django implementation consider that ?
>
> My proposal to implement would be:
>  1. HttpFileResponse which takes file location (relative to MEDIA_URL ?)
>  2. HttpFileResponse checks for settings.X_SENDFILE or
> settings.X_ACCEL_REDIRECT and modifies sets revelant headers
> (Content-Type, X-Sendfile, X-Accel-Redirect) etc. HttpFileResponse
> should fallback to outputting file if no accelerated redirect is
> available.
>  3. Update docs, showing example server config .
>  4. Tests
>
> I could provide patch, if design idea is ok .

The fact that there are multiple interpretations and headers for this
general feature is well known to the core team, and if you search the
django-dev archives and the relevant tickets (esp #2131), there have
been extensive discussions about how this should be handled.

Yours,
Russ Magee %-)

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To post to this group, send email to django-developers@googlegroups.com.
To unsubscribe from this group, send email to 
django-developers+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-developers?hl=en.

Reply via email to