MCPcopy
hub / github.com/tornadoweb/tornado / _read_fixed_body

Method _read_fixed_body

tornado/http1connection.py:648–660  ·  view source on GitHub ↗
(
        self, content_length: int, delegate: httputil.HTTPMessageDelegate
    )

Source from the content-addressed store, hash-verified

646 return None
647
648 async def _read_fixed_body(
649 self, content_length: int, delegate: httputil.HTTPMessageDelegate
650 ) -> None:
651 while content_length > 0:
652 body = await self.stream.read_bytes(
653 min(self.params.chunk_size, content_length), partial=True
654 )
655 content_length -= len(body)
656 if not self._write_finished or self.is_client:
657 with _ExceptionLoggingContext(app_log):
658 ret = delegate.data_received(body)
659 if ret is not None:
660 await ret
661
662 async def _read_chunked_body(self, delegate: httputil.HTTPMessageDelegate) -> None:
663 # TODO: "chunk extensions" http://tools.ietf.org/html/rfc2616#section-3.6.1

Callers 1

_read_bodyMethod · 0.95

Calls 3

read_bytesMethod · 0.80
data_receivedMethod · 0.45

Tested by

no test coverage detected