Merge pull request #779 from Lukasa/develop

Make sure proxy exclusions work properly.
This commit is contained in:
Kenneth Reitz
2012-08-18 17:40:53 -07:00
+1 -1
View File
@@ -536,7 +536,7 @@ class Request(object):
no_proxy = filter(lambda x: x.strip(), self.proxies.get('no', '').split(','))
proxy = self.proxies.get(_p.scheme)
if proxy and not any(map(_p.netloc.endswith, no_proxy)):
if proxy and not any(map(_p.hostname.endswith, no_proxy)):
conn = poolmanager.proxy_from_url(proxy)
_proxy = urlparse(proxy)
if '@' in _proxy.netloc: