When opening a socket for HTTP, httplib2 uses the IP and port that is returned from socket.getaddrinfo(self.host, self.port, 0, socket.SOCK_STREAM). This breaks using an HTTP CONNECT proxy by preventing the socks module from ever seeing the original domain name. Using the orignal hostname and port seem to be the correct choice here as the socket library will resolve them and it would have already been cached.
When opening a socket for HTTP, httplib2 uses the IP and port that is returned from socket.getaddrinfo(self.host, self.port, 0, socket.SOCK_STREAM). This breaks using an HTTP CONNECT proxy by preventing the socks module from ever seeing the original domain name. Using the orignal hostname and port seem to be the correct choice here as the socket library will resolve them and it would have already been cached.

vytisb/httplib2,wikimedia/pywikibot-externals-httplib2,smurfix/httplib2,ashkanalam/httplib2,ccstolley/httplib2,vytisb/httplib2,ccstolley/httplib2,dchusovitin/httplib2,gcd0318/httplib2,bearieq/httplib2,jayvdb/httplib2,arcot/httplib2,jayvdb/httplib2,ashkanalam/httplib2,javitjacob/httplib2,javitjacob/httplib2,bearieq/httplib2,jcgregorio/httplib2,dchusovitin/httplib2,vinodc/httplib2,jcgregorio/httplib2,bearieq/httplib2,gcd0318/httplib2,vinodc/httplib2,smurfix/httplib2,wikimedia/pywikibot-externals-httplib2,smurfix/httplib2,arcot/httplib2