mirror of
https://github.com/python/cpython.git
synced 2025-11-25 04:34:37 +00:00
merge from 3.2 - Fix closes issue12698 - make the no_proxy environment variable handling a bit lenient (accomodate spaces in between the items)
This commit is contained in:
commit
0c8108914e
2 changed files with 5 additions and 2 deletions
|
|
@ -135,7 +135,9 @@ class ProxyTests(unittest.TestCase):
|
|||
proxies = urllib.request.getproxies_environment()
|
||||
# getproxies_environment use lowered case truncated (no '_proxy') keys
|
||||
self.assertEqual('localhost', proxies['no'])
|
||||
|
||||
# List of no_proxies with space.
|
||||
self.env.set('NO_PROXY', 'localhost, anotherdomain.com, newdomain.com')
|
||||
self.assertTrue(urllib.request.proxy_bypass_environment('anotherdomain.com'))
|
||||
|
||||
class urlopen_HttpTests(unittest.TestCase):
|
||||
"""Test urlopen() opening a fake http connection."""
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue