[patch] allow using WSGIErrorOverride when in non-daemon mode

32 views
Skip to first unread message

James Brown

unread,
Apr 19, 2012, 5:56:28 PM4/19/12
to mod...@googlegroups.com
mod_wsgi currently only allows the WSGIErrorOverride directive to be used when in daemon mode. It is sometimes nice to use a single set of apache error-handling directives with a non-daemon mode mod_wsgi. This patch allows the ErrorOverride directive to apply when running mod_wsgi in non-daemon mode if the WSGI application does not actually emit any data itself.
error_override.patch

Graham Dumpleton

unread,
Apr 19, 2012, 11:56:03 PM4/19/12
to mod...@googlegroups.com

The required changes are more complicated than that and part of the
reason hadn't tried to implement it at this point.

You also need to look for whether data was provided via the write()
callback returned by start_response(). You also have to consider
wsgi.file_wrapper.

The change can't be enacted at that point either without a check to
ensure you are only doing it in embedded mode. IOW, you cant do that
in a daemon mode process, which is already handled in a different way.

I can't remember if there were other reasons I had held off doing
this, but overall I felt it was probably doable, it just hadn't been
high priority.

Graham

Reply all
Reply to author
Forward
0 new messages