Copterfly / modwsgi

Automatically exported from code.google.com/p/modwsgi
0 stars 0 forks source link

Implement equivalent to ProxyErrorOverride for WSGI applications. #57

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
WSGI folks believe that they should be in total control of the world, or in
the case of WSGI that the WSGI application should always be in complete
control of the content of any error response page.

The problem with this attitude is that when integrating a WSGI application
into a larger system hosted within Apache, it is not possible to easily
delegate generation of error page content to Apache, such that a consistent
error page style can be used for all applications hosted by the site.

In the case of mod_proxy there exists the ProxyErrorOverride directive,
which allows one to say that you want error pages generated by the back end
application to be ignored when appropriate, and allow Apache to generate
the content through its normal ErrorDocument directives.

An equivalent WSGIErrorOverride directive should be implemented to allow
WSGI applications to be better fitted into a large site where the WSGI
application isn't the only source of content, but just one contributor.

For details on ProxyErrorOverride see:

  http://httpd.apache.org/docs/2.2/mod/mod_proxy.html#proxyerroroverride

Implementing such a feature may be a little tricky because of the multiple
ways or returning content, ie., write(), iterable, file wrapper.

Original issue reported on code.google.com by Graham.Dumpleton@gmail.com on 20 Feb 2008 at 11:31

GoogleCodeExporter commented 8 years ago
Added WSGIErrorOverride directive in revision 1217 of subversion trunk for 3.0. 
Note that the feature only works 
for daemon mode.

Original comment by Graham.Dumpleton@gmail.com on 6 Mar 2009 at 5:22

GoogleCodeExporter commented 8 years ago
Version 3.0 of mod_wsgi now released with new WSGIErrorOverride directive for 
daemon mode.

Original comment by Graham.Dumpleton@gmail.com on 22 Nov 2009 at 2:51