quetz-mod_python-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gregory (Grisha) Trubetskoy" <gri...@apache.org>
Subject Re: non-200 returns, sendfile, Auth Only
Date Wed, 11 Aug 2004 21:47:10 GMT

On Tue, 10 Aug 2004, Terrel Shumway wrote:

>
> non-200 returns
> ---------------
> Here is my handler
>
> def handler(req):
>
>    location = look_this_up_in_the_database_based_on(req.path)
>    log_the_hit(req)
>
>    req.status = req.proto_num>=1001 and 303 or 302

I'm not sure I understand what this line does... :-)

>    req.headers_out["location"]=location
>    req.content_type="text/html"
>    req.write(MY_COOL_TEMPLATE % locals())
>
>    return req.status
>
> The problem is that something -- I don't know if it's apache
> or mod_python -- is adding the standard ErrorDocument after
> my cool template.  How do I stop that?

If you do not want the apache stub response, return apache.OK

HTH,

Grisha

Mime
View raw message