

def redirect(self, url, permanent=False, status=None):
    'Sends a redirect to the given (optionally relative) URL.\n\n        If the ``status`` argument is specified, that value is used as the\n        HTTP status code; otherwise either 301 (permanent) or 302\n        (temporary) is chosen based on the ``permanent`` argument.\n        The default is 302 (temporary).\n        '
    if self._headers_written:
        raise Exception('Cannot redirect after headers have been written')
    if (status is None):
        status = (301 if permanent else 302)
    else:
        assert (isinstance(self, int) and (300 <= status <= 399))
    self.set_status(status)
    self.set_header('Location', urlparse.urljoin(utf8(self.request.uri), utf8(url)))
    self.finish()

dataset/ETHPy150Open RobotWebTools/rosbridge_suite/rosbridge_server/src/tornado/web.py RequestHandler.redirect/VarMisuse@64/200 `status`->`self`