(uri)
| 660 | |
| 661 | |
| 662 | def split_request_uri(uri): |
| 663 | if uri.startswith("//"): |
| 664 | # When the path starts with //, urlsplit considers it as a |
| 665 | # relative uri while the RFC says we should consider it as abs_path |
| 666 | # http://www.w3.org/Protocols/rfc2616/rfc2616-sec5.html#sec5.1.2 |
| 667 | # We use temporary dot prefix to workaround this behaviour |
| 668 | parts = urllib.parse.urlsplit("." + uri) |
| 669 | return parts._replace(path=parts.path[1:]) |
| 670 | |
| 671 | return urllib.parse.urlsplit(uri) |
| 672 | |
| 673 | |
| 674 | # From six.reraise |
no outgoing calls
no test coverage detected