From: Cory Benfield Date: Wed, 15 Aug 2012 17:16:27 +0000 (+0100) Subject: Don't get hung up on ports in proxies. X-Git-Tag: v0.13.7~2^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=00b4ca3b744fa25d3c4aabf49774eaa40caf9f33;p=services%2Fpython-requests.git Don't get hung up on ports in proxies. --- diff --git a/requests/models.py b/requests/models.py index ae3c1be..b45e99c 100644 --- a/requests/models.py +++ b/requests/models.py @@ -556,7 +556,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: