def redirect(url, code=None):
    if not code:
        code = 303 if request.get('SERVER_PROTOCOL') == "HTTP/1.1" else 302
    res = response.copy(cls=HTTPResponse)
    res.status = code
    res.body = ""
    res.set_header('Location', urljoin(request.url, url))
    raise res
Implementation of Reporter callback.
dataset/ETHPy150Open Arelle/Arelle/arelle/webserver/bottle.py/redirect--crossover with--dataset/ETHPy150Open pantsbuild/pants/src/python/pants/reporting/quiet_reporter.py/QuietReporter.do_handle_log