MCPcopy
hub / github.com/benoitc/gunicorn / split_request_uri

Function split_request_uri

gunicorn/util.py:662–671  ·  view source on GitHub ↗
(uri)

Source from the content-addressed store, hash-verified

660
661
662def 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

Callers 5

_parse_fastMethod · 0.90
parse_request_lineMethod · 0.90
__init__Method · 0.90
uriFunction · 0.90
uriFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected