'The :attr:`url` string as an :class:`urlparse.SplitResult` tuple.
The tuple contains (scheme, host, path, query_string and fragment),
but the fragment is always empty because it is not visible to the
server.'

@DictProperty('environ', 'bottle.request.urlparts', read_only=True)
def urlparts(self):

    env = self.environ
    http = (env.get('HTTP_X_FORWARDED_PROTO') or env.get('wsgi.url_scheme', 'http'))
    host = (env.get('HTTP_X_FORWARDED_HOST') or env.get('HTTP_HOST'))
    if (not host):
        host = env.get('SERVER_NAME', '127.0.0.1')
        port = env.get('SERVER_PORT')
        if (port and (port != ('80' if (http == 'http') else '443'))):
            host += (':' + port)
    path = urlquote(self.fullpath)
    return UrlSplitResult(http, host, path, env.get('QUERY_STRING'), '')
