def service_rpc(self):
        if not self.has_access(self.rpc, True):
            return self.render_no_access()
        input = self.read_body
        git_cmd = "upload_pack" if self.rpc == "upload-pack" else "receive_pack"
        self.status = "200"
        self.headers["Content-Type"] = "application/x-git-%s-result" % self.rpc
        return getattr(self.git, git_cmd)(self.dir, {"msg": input}, callback)
dataset/ETHPy150Open douban/gpack/ghttp.py/GHTTPServer.service_rpc/original