From 3347fc25ca74baee17a0b2388631c9b5252ecdcc Mon Sep 17 00:00:00 2001 From: Miroslav Stampar Date: Tue, 3 Mar 2015 15:10:06 +0100 Subject: [PATCH] Fixes #1185 --- lib/request/httpshandler.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/request/httpshandler.py b/lib/request/httpshandler.py index aa24eb474..7ea178160 100644 --- a/lib/request/httpshandler.py +++ b/lib/request/httpshandler.py @@ -53,7 +53,8 @@ class HTTPSConnection(httplib.HTTPSConnection): break else: sock.close() - except (ssl.SSLError, socket.error), errMsg: + except (ssl.SSLError, socket.error, httplib.BadStatusLine), errMsg: + self._tunnel_host = None logger.debug("SSL connection error occurred ('%s')" % errMsg) if not success: