From 8e7282f7c7bb389522283a6597aa5ae83fe9f003 Mon Sep 17 00:00:00 2001 From: Bernardo Damele Date: Wed, 20 May 2009 13:51:25 +0000 Subject: [PATCH] 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. --- lib/request/proxy.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/request/proxy.py b/lib/request/proxy.py index f7853b0d8..ed09b8f3c 100644 --- a/lib/request/proxy.py +++ b/lib/request/proxy.py @@ -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