MCPcopy
hub / github.com/pallets/werkzeug / on_exhausted

Method on_exhausted

src/werkzeug/wsgi.py:482–495  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

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

Callers 2

readintoMethod · 0.95
readallMethod · 0.95

Calls 1

Tested by

no test coverage detected