def http_methods_allowed(methods=['GET', 'HEAD']):
    method = cherrypy.request.method.upper()
    if method not in methods:
        cherrypy.response.headers['Allow'] = ", ".join(methods)
        raise cherrypy.HTTPError(405)
dataset/ETHPy150Open racker/rackspace-monitoring/demo/web/app.py/http_methods_allowed/original