def request_path(request):
    url = request.get_full_url()
    #scheme, netloc, path, parameters, query, frag = urlparse.urlparse(url)
    #req_path = escape_path("".join(urlparse.urlparse(url)[2:]))
    path, parameters, query, frag = urlparse.urlparse(url)[2:]
    if parameters:
        path = "%s;%s" % (path, parameters)
    path = escape_path(path)
    req_path = urlparse.urlunparse(("", "", path, "", query, frag))
    if not req_path.startswith("/"):
        # fix bad RFC 2396 absoluteURI
        req_path = "/"+req_path
    return req_path
request-URI, as defined by RFC 2965.
dataset/ETHPy150Open babble/babble/include/jython/Lib/cookielib.py/request_path