소스 검색

Catch TypeError in Content-Length parsing

tags/v0.2.2
JustAnotherArchivist 4 년 전
부모
커밋
2895f4bfdf
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. +1
    -1
      qwarc/aiohttp.py

+ 1
- 1
qwarc/aiohttp.py 파일 보기

@@ -126,7 +126,7 @@ class ClientResponse(aiohttp.client_reqrep.ClientResponse):
respMsg = aiohttp.http_parser.HttpResponseParserPy().parse_message(beginning[:pos + 2].split(b'\r\n'))
try:
length = int(self.headers.get('Content-Length'))
except (KeyError, ValueError):
except (KeyError, ValueError, TypeError):
length = None
parser = aiohttp.http_parser.HttpPayloadParser(payload, length = length, chunked = respMsg.chunked, compression = respMsg.compression, code = respMsg.code, method = self.method)
eof, data = parser.feed_data(beginning[pos + 4:])


불러오는 중...
취소
저장