aboutsummaryrefslogtreecommitdiffstats
path: root/libmproxy/proxy.py
diff options
context:
space:
mode:
Diffstat (limited to 'libmproxy/proxy.py')
-rw-r--r--libmproxy/proxy.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/libmproxy/proxy.py b/libmproxy/proxy.py
index 6196dc0e..e7a10d60 100644
--- a/libmproxy/proxy.py
+++ b/libmproxy/proxy.py
@@ -192,6 +192,15 @@ class FileLike:
def flush(self):
pass
+ def read(self, length):
+ result = ''
+ while len(result) < length:
+ data = self.o.read(length)
+ if not data:
+ break
+ result += data
+ return result
+
def readline(self):
result = ''
while True: