def default_error_page(**kwargs):
"""This function is registered as the default error page
for CherryPy errors. This sets the response headers to
be uncacheable, and then returns a HTTP response that is
identical to the default CherryPy message format."""
response = cherrypy.response
for key in ('Cache-Control', 'Pragma'):
if key in response.headers:
del response.headers[key]
return _HTTPErrorTemplate % kwargs
评论列表
文章目录