mirror of
https://github.com/python/cpython.git
synced 2025-08-04 17:08:35 +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
|
@ -1851,9 +1851,17 @@ class MiscTests(unittest.TestCase):
|
|||
('ftp', 'joe', 'password', 'proxy.example.com')),
|
||||
# Test for no trailing '/' case
|
||||
('http://joe:password@proxy.example.com',
|
||||
('http', 'joe', 'password', 'proxy.example.com'))
|
||||
('http', 'joe', 'password', 'proxy.example.com')),
|
||||
# Testcases with '/' character in username, password
|
||||
('http://user/name:password@localhost:22',
|
||||
('http', 'user/name', 'password', 'localhost:22')),
|
||||
('http://username:pass/word@localhost:22',
|
||||
('http', 'username', 'pass/word', 'localhost:22')),
|
||||
('http://user/name:pass/word@localhost:22',
|
||||
('http', 'user/name', 'pass/word', 'localhost:22')),
|
||||
]
|
||||
|
||||
|
||||
for tc, expected in parse_proxy_test_cases:
|
||||
self.assertEqual(_parse_proxy(tc), expected)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue