depot.py 文件源码

python
阅读 19 收藏 0 点赞 0 评论 0

项目:solaris-ips 作者: oracle 项目源码 文件源码
def file_1(self, *tokens):
                """Outputs the contents of the file, named by the SHA hash
                name in the request path, directly to the client."""

                method = cherrypy.request.method
                if method == "GET":
                        return self.file_0(*tokens)
                elif method in ("POST", "PUT"):
                        return self.__upload_file(*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
        # file 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.
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号