I haven't really tried this myself yet, but I looked into it and the only thing I could find that may be useful is cherrypy.headerMap[1]. Using this you may be able to alter the response code of the page given certain criteria.
- Lee [1] http://www.cherrypy.org/wiki/ReturnVsYield - See the code snippet near the bottom of the page. On 04/11/05, Jeff Grimmett <[EMAIL PROTECTED]> wrote: > I'm a little confused on error handling in TG versus CherryPy itself. The CP > site has a few examples of how to ensure that a 404 response is sent for a > page that does not exist, but it looks like it would conflict with the use > of Kid templates to generate a 'custom' 404 page. > > Currently, I have a 'default' defined for my Root class; if someone requests > a page that does not exist, it falls through to this method and it then uses > my 404.kid template to generate a custom not-found page. > > That's cool so far, but shouldn't a 404 error be sent in the response? When > using the 'default' method, I'm sending a '200' response (page found), which > is not very useful to crawlers, etc. > > What's the best way to handle this? Dispose of default() and use the CP > error handler instead? > > -- > "Things fall apart. The Center cannot hold." > - Life as a QA geek, in a nutshell. > > Best, > > Jeff >

