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