From 1035ee9c3d126f423e4f4898c644f68669e9d593 Mon Sep 17 00:00:00 2001 From: stamparm Date: Fri, 26 Apr 2013 14:49:24 +0200 Subject: [PATCH] Patch for an Issue #442 --- lib/request/httpshandler.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lib/request/httpshandler.py b/lib/request/httpshandler.py index 35a06f0bb..0f32385b6 100644 --- a/lib/request/httpshandler.py +++ b/lib/request/httpshandler.py @@ -62,3 +62,11 @@ class HTTPSConnection(httplib.HTTPSConnection): class HTTPSHandler(urllib2.HTTPSHandler): def https_open(self, req): return self.do_open(HTTPSConnection if ssl else httplib.HTTPSConnection, req) + +# Bug fix (http://bugs.python.org/issue17849) + +def _(self, *args): + return self._readline() + +httplib.LineAndFileWrapper._readline = httplib.LineAndFileWrapper.readline +httplib.LineAndFileWrapper.readline = _