summaryrefslogtreecommitdiff
path: root/Lib/urllib/request.py
diff options
context:
space:
mode:
authorLarry Hastings <larry@hastings.org>2017-01-17 00:56:40 -0800
committerLarry Hastings <larry@hastings.org>2017-01-17 00:56:40 -0800
commit09e4ce5a951d19c96eb078d22e5eacb17d55b8de (patch)
tree6579d3607474569d0247d3c0fe46ba218c805540 /Lib/urllib/request.py
parentc620f200d619a92a5e5b0c76c5ee890894502d7c (diff)
parent80490525e0e9c08860b0de0c416dbe71c6593af7 (diff)
downloadcpython-git-09e4ce5a951d19c96eb078d22e5eacb17d55b8de.tar.gz
Merge 3.5.3 release head with main 3.5 branch.
Diffstat (limited to 'Lib/urllib/request.py')
-rw-r--r--Lib/urllib/request.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/Lib/urllib/request.py b/Lib/urllib/request.py
index a4bf97dcd3..a46c689493 100644
--- a/Lib/urllib/request.py
+++ b/Lib/urllib/request.py
@@ -2450,6 +2450,7 @@ def proxy_bypass_environment(host, proxies=None):
no_proxy_list = [proxy.strip() for proxy in no_proxy.split(',')]
for name in no_proxy_list:
if name:
+ name = name.lstrip('.') # ignore leading dots
name = re.escape(name)
pattern = r'(.+\.)?%s$' % name
if (re.match(pattern, hostonly, re.I)