summaryrefslogtreecommitdiffstats
path: root/Lib/urllib/request.py
diff options
context:
space:
mode:
authorXiang Zhang <angwerzx@126.com>2017-01-09 03:52:10 (GMT)
committerXiang Zhang <angwerzx@126.com>2017-01-09 03:52:10 (GMT)
commit04c15d5bdc1960be67b4d93f846141e6451a0c6c (patch)
tree1ad0b60d4e329cb0b1822ae1215075d1830604bc /Lib/urllib/request.py
parent9d60b94427f42b3f543e398205113a1b18b43598 (diff)
parentc44d58a77a123873b093c4690056ef4d20e873f3 (diff)
downloadcpython-04c15d5bdc1960be67b4d93f846141e6451a0c6c.zip
cpython-04c15d5bdc1960be67b4d93f846141e6451a0c6c.tar.gz
cpython-04c15d5bdc1960be67b4d93f846141e6451a0c6c.tar.bz2
Issue #29142: Merge 3.6.
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 793ea7f..0a9fdf9 100644
--- a/Lib/urllib/request.py
+++ b/Lib/urllib/request.py
@@ -2513,6 +2513,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)