Graham Dumpleton
grahamd at dscpl.com.au
Mon Nov 14 16:35:33 EST 2005
FYI, support of HEAD has already been incorporated into upcoming mod_python 3.2 release. Waitman Gobble wrote .. > > Changing publisher.py as follows: > > def handler(req): > > req.allow_methods(["GET", "POST","HEAD"]) > if req.method not in ["GET", "POST", "HEAD"]: > raise apache.SERVER_RETURN, apache.HTTP_METHOD_NOT_ALLOWED > > (added "HEAD" to two lines) > > seems to allow proper HEAD requests: > > # HEAD http://pyblog.com/index/d > 404 Not Found > > # HEAD http://pyblog.com/doit/naughty > 200 OK > > # HEAD http://pyblog.com/doit/good > 500 Internal Server Error > > If you know why HEAD should be forbidden, let me know. > > I'd still like to catch uncaught exceptions somehow. > > Thank you, > > -- > Waitman Gobble > http://waitman.net/ > (707) 237-6921 > > _______________________________________________ > Mod_python mailing list > Mod_python at modpython.org > http://mailman.modpython.org/mailman/listinfo/mod_python
|