diff options
Diffstat (limited to 'Lib/urllib/request.py')
-rw-r--r-- | Lib/urllib/request.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Lib/urllib/request.py b/Lib/urllib/request.py index d1acae1..4a571e8 100644 --- a/Lib/urllib/request.py +++ b/Lib/urllib/request.py @@ -2274,7 +2274,8 @@ def proxy_bypass_environment(host): # strip port off host hostonly, port = splitport(host) # check if the host ends with any of the DNS suffixes - for name in no_proxy.split(','): + no_proxy_list = [proxy.strip() for proxy in no_proxy.split(',')] + for name in no_proxy_list: if name and (hostonly.endswith(name) or host.endswith(name)): return 1 # otherwise, don't bypass |