Called when attempting to read after the limit has been reached. The default behavior is to do nothing, unless the limit is a maximum, in which case it raises :exc:`.RequestEntityTooLarge`. .. versionchanged:: 2.3 Raises ``RequestEntityTooLarge`` if the limit is
(self)
| 480 | return self._pos >= self.limit |
| 481 | |
| 482 | def on_exhausted(self) -> None: |
| 483 | """Called when attempting to read after the limit has been reached. |
| 484 | |
| 485 | The default behavior is to do nothing, unless the limit is a maximum, in which |
| 486 | case it raises :exc:`.RequestEntityTooLarge`. |
| 487 | |
| 488 | .. versionchanged:: 2.3 |
| 489 | Raises ``RequestEntityTooLarge`` if the limit is a maximum. |
| 490 | |
| 491 | .. versionchanged:: 2.3 |
| 492 | Any return value is ignored. |
| 493 | """ |
| 494 | if self._limit_is_max: |
| 495 | raise RequestEntityTooLarge() |
| 496 | |
| 497 | def on_disconnect(self, error: Exception | None = None) -> None: |
| 498 | """Called when an attempted read receives zero bytes before the limit was |
no test coverage detected