[mod_python] Returning HTTP_MULTI_STATUS from a custom handler

Indrek Järve indrek at inversion.ee
Mon Jun 14 18:43:16 EDT 2004


I'm currently working on creating a WebDAV implementation in mod_python.
To achieve this, I've written a custom request handler which does the
work required for each request and returns the defined status code
according to WebDAV spec. However, whenever I try to return
apache.HTTP_MULTI_STATUS (required by some response types), something
funky happens. A standard apache "internal error occured" gets appended
to the client output, and apache return code gets changed to 200. It's
rather easy to duplicate, a minimal handler like below reproduces it on
my Suse 9.0/mod_python 3.0 box.


from mod_python import apache

def handler(req):
    req.content_type = 'text/plain; charset=UTF-8"
    return apache.HTTP_MULTI_STATUS

Am I doing something awfully wrong or is this a general problem?


More information about the Mod_python mailing list