'Sends a redirect to the given (optionally relative) URL.
----->>>>> NOTE: Removed self.finish <<<<<-----
If the ``status`` argument is specified, that value is used as the
HTTP status code; otherwise either 301 (permanent) or 302
(temporary) is chosen based on the ``permanent`` argument.
The default is 302 (temporary).'

def redirect(self, url, permanent=False, status=None):

    from tornado.escape import utf8
    if (not url.startswith(sickbeard.WEB_ROOT)):
        url = (sickbeard.WEB_ROOT + url)
    if self._headers_written:
        raise Exception(u'Cannot    redirect    after    headers    have    been    written')
    if (not status):
        status = (301 if permanent else 302)
    else:
        assert isinstance(status, int)
        assert (300 <= status <= 399)
    self.set_status(status)
    self.set_header(u'Location', urljoin(utf8(self.request.uri), utf8(url)))
