Major bug fix to properly pass HTTPS request to HTTP proxy when its provided. It works with both Python 2.4 and Python 2.5 now. It still crashes at httplib level with Python 2.6.

This commit is contained in:
Bernardo Damele 2009-05-20 13:51:25 +00:00
parent 440a52b84d
commit 8e7282f7c7

View File

@ -57,7 +57,7 @@ class ProxyHTTPConnection(httplib.HTTPConnection):
self._real_host = host
self._real_port = int(port)
httplib.HTTPConnection.request(self, method, url, body, headers)
httplib.HTTPConnection.request(self, method, rest, body, headers)
def connect(self):
@ -89,7 +89,7 @@ class ProxyHTTPConnection(httplib.HTTPConnection):
class ProxyHTTPSConnection(ProxyHTTPConnection):
default_port = 443
def __init__(self, host, port=None, key_file=None, cert_file=None, strict=None):
def __init__(self, host, port=None, key_file=None, cert_file=None, strict=None, timeout=None):
ProxyHTTPConnection.__init__(self, host, port)
self.key_file = key_file
self.cert_file = cert_file