Path component of request-URI, as defined by RFC 2965.
(request)
| 646 | return req_host, erhn |
| 647 | |
| 648 | def request_path(request): |
| 649 | """Path component of request-URI, as defined by RFC 2965.""" |
| 650 | url = request.get_full_url() |
| 651 | parts = urllib.parse.urlsplit(url) |
| 652 | path = escape_path(parts.path) |
| 653 | if not path.startswith("/"): |
| 654 | # fix bad RFC 2396 absoluteURI |
| 655 | path = "/" + path |
| 656 | return path |
| 657 | |
| 658 | def request_port(request): |
| 659 | host = request.host |
searching dependent graphs…