On 26/03/11 11:31, Graham Dumpleton wrote:
>
> Yes and no as nginx also has a X-Sendfile module, again possibly
> optional (can't remember).

I didn't know there was an X-Sendfile module for Nginx -- Search results
for "nginx xsendfile" point me to X-Accel-Redirect.


> In Apache/mod_wsgi when using daemon mode you have CGI style
> 200/Location to use as well.
>
> So, you have a mix of file system path and URL based schemes. In the
> case of file system based schemes, because the code processing
> X-Sendfile is potentially a different process, then you also have to
> deal with issues of that other process not having the required
> permissions to access the file even though the original application did.
>
> For URL based schemes, nginx has an easy way to designate the URLs
> which are the target of X-Accel-Redirect are private and only
> accessible from a sub request triggered by the header. For Apache when
> using 200/Location, you have to use a mod_rewrite rule to effect
> private URLs.
>
> Other proxy/load balancing front ends such a Pound and Squid (???)
> also support their own headers for this sort of URL sub requests.
>
> Add to this wsgi.file_wrapper and you have three different schemes one
> can use. For the case of URL mechanism, there also various headers and
> consumers of the headers.

I think wsgi.file_wrapper is a different beast. I would not try to
support it along with X-Sendfile/X-Accel-Redirect/Location.


> In short, it is all a mess and trying to provide support for it in one
> bit of code is possibly asking a bit much.

I agree with you. However, I think trying to offer some kind of common
abstraction may still be beneficial.

Cheers.

-- 
Gustavo Narea.
Software Developer.
2degrees, Ltd. <http://www.2degreesnetwork.com/>.

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