Merge pull request #1552 from Lukasa/noproxy

Allow spaces in the no_proxy environ variable
This commit is contained in:
Kenneth Reitz
2013-08-23 17:23:57 -07:00
+1 -1
View File
@@ -402,7 +402,7 @@ def get_environ_proxies(url):
if no_proxy:
# We need to check whether we match here. We need to see if we match
# the end of the netloc, both with and without the port.
no_proxy = no_proxy.split(',')
no_proxy = no_proxy.replace(' ', '').split(',')
for host in no_proxy:
if netloc.endswith(host) or netloc.split(':')[0].endswith(host):