summaryrefslogtreecommitdiffstats
path: root/Lib/urllib
diff options
context:
space:
mode:
authorXiang Zhang <angwerzx@126.com>2017-01-09 03:50:02 (GMT)
committerXiang Zhang <angwerzx@126.com>2017-01-09 03:50:02 (GMT)
commitc44d58a77a123873b093c4690056ef4d20e873f3 (patch)
treef7d8d341e7938ef0e9899066622b944bc620b38b /Lib/urllib
parent19c7238560644accd00c6ccd4497ef40142a06c2 (diff)
parent959ff7f1c6412fe768a29ffe1d355f126dc9e80c (diff)
downloadcpython-c44d58a77a123873b093c4690056ef4d20e873f3.zip
cpython-c44d58a77a123873b093c4690056ef4d20e873f3.tar.gz
cpython-c44d58a77a123873b093c4690056ef4d20e873f3.tar.bz2
Issue #29142: Merge 3.5.
Diffstat (limited to 'Lib/urllib')
-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 5f15b74..b6690c3 100644
--- a/Lib/urllib/request.py
+++ b/Lib/urllib/request.py
@@ -2514,6 +2514,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)