MCPcopy
hub / github.com/encode/uvicorn / on_body

Method on_body

uvicorn/protocols/http/httptools_impl.py:312–318  ·  view source on GitHub ↗
(self, body: bytes)

Source from the content-addressed store, hash-verified

310 self.tasks.add(task)
311
312 def on_body(self, body: bytes) -> None:
313 if (self.parser.should_upgrade() and self._should_upgrade()) or self.cycle.response_complete:
314 return
315 self.cycle.body += body
316 if len(self.cycle.body) > HIGH_WATER_LIMIT:
317 self.flow.pause_reading()
318 self.cycle.message_event.set()
319
320 def on_message_complete(self) -> None:
321 if (self.parser.should_upgrade() and self._should_upgrade()) or self.cycle.response_complete:

Callers

nothing calls this directly

Calls 2

_should_upgradeMethod · 0.95
pause_readingMethod · 0.45

Tested by

no test coverage detected