Parcourir la source

Fix ClientResponse._read returning more than nbytes if the entire response fits into the first block fed into the parser

tags/v0.2.2^0
JustAnotherArchivist il y a 4 ans
Parent
révision
4d9e4d8fe8
1 fichiers modifiés avec 2 ajouts et 0 suppressions
  1. +2
    -0
      qwarc/aiohttp.py

+ 2
- 0
qwarc/aiohttp.py Voir le fichier

@@ -147,6 +147,8 @@ class ClientResponse(aiohttp.client_reqrep.ClientResponse):

if payload.exc:
raise Exception from payload.exc
if nbytes is not None:
return payload.data.getvalue()[:nbytes]
return payload.data.getvalue()

async def read(self, nbytes = None):


Chargement…
Annuler
Enregistrer