-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Closed
Description
On emscripten, if the request is read in chunks, sometimes it fails to read the whole amount. This is because the code in response.py assumes that if a read() call to the underlying request stream doesn't fill the buffer it is given, this must be the last buffer in the stream, which isn't the case sometimes, because the chunks we read are those given by javascript, which may be of arbitrary size.
urllib3/src/urllib3/contrib/emscripten/response.py
Lines 165 to 167 in 37565dc
if (self.length_is_certain and self.length_remaining == 0) or len( | |
data | |
) < amt: |
I have a fix, which I'll make a PR for in a mo.
mscolnick, agriyakhetarpal and thohan88
Metadata
Metadata
Assignees
Labels
No labels