code: def request_path(request):
      
      url = request.get_full_url()
      parts = urlsplit(url)
      path = escape_path(parts.path)
      if not path.startswith("/"):
          # fix bad RFC 2396 absoluteURI
          path = "/" + path
      return path
docs: Path component of request-URI, as defined by RFC 2965.