diff --git a/aiohttp/protocol.py b/aiohttp/protocol.py index 6299065aa0e..b5fac701764 100644 --- a/aiohttp/protocol.py +++ b/aiohttp/protocol.py @@ -319,7 +319,7 @@ def parse_chunked_payload(self, out, buf): try: size = int(line, 16) except ValueError: - raise errors.IncompleteRead(b'') from None + raise errors.IncompleteRead(0) from None if size == 0: # eof marker break @@ -373,7 +373,7 @@ def feed_data(self, chunk): try: chunk = self.zlib.decompress(chunk) except Exception: - raise errors.IncompleteRead(b'') from None + raise errors.IncompleteRead(0) from None if chunk: self.out.feed_data(chunk) @@ -381,7 +381,7 @@ def feed_data(self, chunk): def feed_eof(self): self.out.feed_data(self.zlib.flush()) if not self.zlib.eof: - raise errors.IncompleteRead(b'') + raise errors.IncompleteRead(0) self.out.feed_eof()