mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
Allow / character in username,password fields in _PROXY envvars. (#23973)
This commit is contained in:
parent
c1af128f5a
commit
030a713183
3 changed files with 15 additions and 2 deletions
|
@ -773,7 +773,11 @@ def _parse_proxy(proxy):
|
|||
raise ValueError("proxy URL with no authority: %r" % proxy)
|
||||
# We have an authority, so for RFC 3986-compliant URLs (by ss 3.
|
||||
# and 3.3.), path is empty or starts with '/'
|
||||
end = r_scheme.find("/", 2)
|
||||
if '@' in r_scheme:
|
||||
host_separator = r_scheme.find('@')
|
||||
end = r_scheme.find("/", host_separator)
|
||||
else:
|
||||
end = r_scheme.find("/", 2)
|
||||
if end == -1:
|
||||
end = None
|
||||
authority = r_scheme[2:end]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue