[mod_python] Output filters and 4xx error codes

Graham Dumpleton graham.dumpleton at gmail.com
Tue Dec 16 23:05:08 EST 2008

Reading back properly now through your original email and reading
linked mailing list discussions, if mod_proxy_http.c isn't passing
error responses from down stream server through output filter chain
and you really need to be getting those and modifying them, and not
just using ProxyErrorOverride to generate local error page, not sure
what you can do.


2008/12/17 Andrew Ryan <andrewr at collab.net>:
> On 12/16/08 3:58 PM, "Graham Dumpleton" <graham.dumpleton at gmail.com> wrote:
>> What are you actually trying to change? Response content or response headers?
> Ideally, both (that's what I do in the non-4xx case). In this particular
> case, it would be sufficient to change response content.
> Below is the example response I'm working with now. I want my output filter
> to rewrite this:
>  <meta http-equiv='refresh' content='1;url=/login?from=%2F'/>
> as:
>  <meta http-equiv='refresh' content='1;url=/apps/myapp/login?from=%2F'/>
> The actual response:
> HTTP/1.0 403 Forbidden
> Server: Winstone Servlet Engine v0.9.10
> Content-Type: text/html;charset=UTF-8
> Content-Length: 227
> Connection: Close
> Date: Thu, 15 Jan 2009 01:58:56 GMT
> X-Powered-By: Servlet/2.5 (Winstone/0.9.10)
> Set-Cookie: JSESSIONID=5f2a46cc8dc7c97e43fea358f60c4aeb; Path=/
> <html><head><meta http-equiv='refresh'
> content='1;url=/login?from=%2F'/><script>window.location.replace('/login?fro
> m=%2F');</script></head><body style='backgournd-color:white; color:white;'>

More information about the Mod_python mailing list