def get_current_url(environ, root_only=False, strip_querystring=False,
                    host_only=False):
    tmp = [environ['wsgi.url_scheme'], '://', get_host(environ)]
    cat = tmp.append
    if host_only:
        return ''.join(tmp) + '/'
    cat(urllib_quote(environ.get('SCRIPT_NAME', '').rstrip('/')))
    if root_only:
        cat('/')
    else:
        cat(urllib_quote('/' + environ.get('PATH_INFO', '').lstrip('/')))
        if not strip_querystring:
            qs = environ.get('QUERY_STRING')
            if qs:
                cat('?' + qs)
    return ''.join(tmp)
Equals :meth:`route`.
dataset/ETHPy150Open getsentry/raven-python/raven/utils/wsgi.py/get_current_url--crossover with--dataset/ETHPy150Open adampresley/bottlepy-bootstrap/app/bottle.py/Bottle.get