def manifest_1(self, *tokens):
"""Outputs the contents of the manifest or uploads the
manifest."""
method = cherrypy.request.method
if method == "GET":
return self.manifest_0(*tokens)
elif method in ("POST", "PUT"):
return self.__upload_manifest(*tokens)
raise cherrypy.HTTPError(http_client.METHOD_NOT_ALLOWED,
"{0} is not allowed".format(method))
# We need to prevent cherrypy from processing the request body so that
# manifest can parse the request body itself. In addition, we also need
# to set the timeout higher since the default is five minutes; not
# really enough for a slow connection to upload content.
评论列表
文章目录