[mod_python] returning errors from python handler and ErrorDocument

Nic Ferrier nferrier at tapsellferrier.co.uk
Sat Nov 26 08:55:18 EST 2005


I've got a python handler that does this:

   # something.py

   def handler(http):
      http.status = apache.UNAUTHORIZED
      return apache.OK


And in the apache config I've got something like:

   <Location /something>
   SetHandler python-program
   PythonHandler something
   </Location>

   ErrorDocument 401 /somepage.html


But the error document is not being served for requests to my
handler. I think it should because I'm returning 401.

Can someone enlighten me? Does the request processing just not work
like that?



Nic


More information about the Mod_python mailing list