summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Lib/httplib.py25
1 files changed, 25 insertions, 0 deletions
diff --git a/Lib/httplib.py b/Lib/httplib.py
index 03adb43..9832e47 100644
--- a/Lib/httplib.py
+++ b/Lib/httplib.py
@@ -910,6 +910,31 @@ class SSLFile(SharedSocketClient):
self._buf = all[i:]
return line
+ def readlines(self, sizehint=0):
+ total = 0
+ list = []
+ while True:
+ line = self.readline()
+ if not line:
+ break
+ list.append(line)
+ total += len(line)
+ if sizehint and total >= sizehint:
+ break
+ return list
+
+ def fileno(self):
+ return self._sock.fileno()
+
+ def __iter__(self):
+ return self
+
+ def next(self):
+ line = self.readline()
+ if not line:
+ raise StopIteration
+ return line
+
class FakeSocket(SharedSocketClient):
class _closedsocket: