+ return super().__init__(404)
+
+class redirect(dispatch.restart):
+ def __init__(self, url, status = 303):
+ super().__init__()
+ self.url = url
+ self.status = status
+
+ def handle(self, req):
+ req.status(self.status, "Redirect")
+ req.ohead["Location"] = proto.appendurl(proto.requrl(req), self.url)
+ return []