mirror of
https://github.com/Grasscutters/mitmproxy.git
synced 2024-11-30 03:14:22 +00:00
Fix SSL requests with Transfer-Encoding: chunked
Add size parameter to FileLike.readline, used by read_chunked.
This commit is contained in:
parent
e67dbf6123
commit
23f7214fc3
@ -184,10 +184,14 @@ class FileLike:
|
||||
result += data
|
||||
return result
|
||||
|
||||
def readline(self):
|
||||
def readline(self, size = None):
|
||||
result = ''
|
||||
bytes_read = 0
|
||||
while True:
|
||||
if size is not None and bytes_read >= size:
|
||||
break
|
||||
ch = self.read(1)
|
||||
bytes_read += 1
|
||||
if not ch:
|
||||
break
|
||||
else:
|
||||
|
Loading…
Reference in New Issue
Block a user