浏览代码

Handle EOF from the HTTP payload parser correctly

Note that this should never matter anyway because the response is already run through the payload parser before.
tags/v0.2.2
JustAnotherArchivist 4 年前
父节点
当前提交
939978beec
共有 1 个文件被更改,包括 3 次插入2 次删除
  1. +3
    -2
      qwarc/aiohttp.py

+ 3
- 2
qwarc/aiohttp.py 查看文件

@@ -133,10 +133,11 @@ class ClientResponse(aiohttp.client_reqrep.ClientResponse):
while True:
chunk = self._rawData.responseData.read(1048576)
if not chunk:
if data:
parser.feed_data(data)
break
eof, data = parser.feed_data(chunk)
# data can only not be None if eof is True, so there is no need to actually do anything about it
if eof:
break
if not eof:
parser.feed_eof()



正在加载...
取消
保存