pub fn resolve_body(
r: Box<dyn Read + Send>,
headers: &Header,
kind: MessageKind,
) -> Result<Body, ParseError>Expand description
Resolve the body reader for a message given its headers and kind.
Port of Go’s readTransfer: chooses chunked, content-length, unbounded, or
empty framing, then wraps r accordingly.
Returns (body, trailers_key) — trailers_key is true if the Trailer
header was present, signaling that the caller should harvest trailer headers
from the chunked reader after reading is complete.