(self, n)
| 718 | return result |
| 719 | |
| 720 | def _read1_chunked(self, n): |
| 721 | # Strictly speaking, _get_chunk_left() may cause more than one read, |
| 722 | # but that is ok, since that is to satisfy the chunked protocol. |
| 723 | chunk_left = self._get_chunk_left() |
| 724 | if chunk_left is None or n == 0: |
| 725 | return b'' |
| 726 | if not (0 <= n <= chunk_left): |
| 727 | n = chunk_left # if n is negative or larger than chunk_left |
| 728 | read = self.fp.read1(n) |
| 729 | self.chunk_left -= len(read) |
| 730 | if not read: |
| 731 | raise IncompleteRead(b"") |
| 732 | return read |
| 733 | |
| 734 | def _peek_chunked(self, n): |
| 735 | # Strictly speaking, _get_chunk_left() may cause more than one read, |
no test coverage detected