(self, chunk: bytes)
| 728 | return self._delegate.headers_received(start_line, headers) |
| 729 | |
| 730 | async def data_received(self, chunk: bytes) -> None: |
| 731 | if self._decompressor: |
| 732 | compressed_data = chunk |
| 733 | while compressed_data: |
| 734 | decompressed = self._decompressor.decompress( |
| 735 | compressed_data, self._chunk_size |
| 736 | ) |
| 737 | if decompressed: |
| 738 | ret = self._delegate.data_received(decompressed) |
| 739 | if ret is not None: |
| 740 | await ret |
| 741 | compressed_data = self._decompressor.unconsumed_tail |
| 742 | if compressed_data and not decompressed: |
| 743 | raise httputil.HTTPInputError( |
| 744 | "encountered unconsumed gzip data without making progress" |
| 745 | ) |
| 746 | else: |
| 747 | ret = self._delegate.data_received(chunk) |
| 748 | if ret is not None: |
| 749 | await ret |
| 750 | |
| 751 | def finish(self) -> None: |
| 752 | if self._decompressor is not None: |
no test coverage detected