Return a :class:`urlparse.SplitResult` tuple that can be used
            to reconstruct the full URL as requested by the client.
            The tuple contains: (scheme, host, path, query_string, fragment).
            The fragment is always empty because it is not visible to the server.

def urlparts(self):
        ''' Return a :class:`urlparse.SplitResult` tuple that can be used
            to reconstruct the full URL as requested by the client.
            The tuple contains: (scheme, host, path, query_string, fragment).
            The fragment is always empty because it is not visible to the server.
        '''
        env = self.environ
        http = env.get('wsgi.url_scheme', 'http')
        host = env.get('HTTP_X_FORWARDED_HOST') or env.get('HTTP_HOST')
        if not host:
            # HTTP 1.1 requires a Host-header. This is for HTTP/1.0 clients.
            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
        spath = self.environ.get('SCRIPT_NAME','').rstrip('/') + '/'
        rpath = self.path.lstrip('/')
        path = urlquote(urljoin(spath, rpath))
        return UrlSplitResult(http, host, path, env.get('QUERY_STRING'), '')