docs: def urlparts(self):
          ''' 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. '''
          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:
              # 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
          path = urlquote(self.fullpath)
          return UrlSplitResult(http, host, path, env.get('QUERY_STRING'), '')