From 2dda7ee2e5a8e1d4e6531d1923a1177b1bb003c9 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 16 Aug 2011 13:26:51 -0400 Subject: Fixed issue where proxy bypass detection failed when a port was specified. --- python2/httplib2/__init__.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'python2') diff --git a/python2/httplib2/__init__.py b/python2/httplib2/__init__.py index ff7e384..f55e596 100644 --- a/python2/httplib2/__init__.py +++ b/python2/httplib2/__init__.py @@ -35,6 +35,7 @@ import gzip import zlib import httplib import urlparse +import urllib import base64 import os import copy @@ -1546,12 +1547,13 @@ a string that contains the response entity body. """Return a ProxyInfo instance (or None) based on the scheme and authority. """ + hostname, port = urllib.splitport(authority) proxy_info = self.proxy_info if callable(proxy_info): proxy_info = proxy_info(scheme) if (hasattr(proxy_info, 'applies_to') - and not proxy_info.applies_to(authority)): + and not proxy_info.applies_to(hostname)): proxy_info = None return proxy_info -- cgit v1.2.1