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 .

On Thu, Mar 24, 2011 at 1:49 PM, Russell Keith-Magee
<russ...@keith-magee.com> wrote:
> On Wed, Mar 23, 2011 at 5:20 AM, Paul McMillan <p...@mcmillan.ws> wrote:
>> It's worth pointing out that manage.py runserver isn't likely to ever
>> support serving those files even if the header arrives in core. It's
>> explicitly not appropriate for any kind of production use, fallback or
>> otherwise. If you really need support for your development work (and
>> checking the headers on the response isn't good enough), you should be
>> developing in an environment closer to your production server.
>>
>> I would be very much -1 to any proposal to include code that actually
>> served the file in django core if the webserver doesn't support
>> X-Sendfile.
>>
>> That said, I'd very much like to see support for the header in core.
>> It's commonly used, and reimplementing it every time is silly.
>
> Agreed. We just need someone to do the work. Did I hear the sound of
> someone volunteering? :-)
>
> 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.
>
>

-- 
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