pub async fn read_until_header_end<R>(
stdout: R,
deadline: Instant,
) -> Result<(Vec<u8>, Vec<u8>, R), HeaderReadError>Expand description
Read from stdout until the RFC 3875 header / body separator
(\r\n\r\n), or until deadline. Returns the header block (up
to and including the separator), the leftover bytes that
arrived in the same read() past the separator, and the
still-open reader for downstream body streaming.
ยงErrors
HeaderReadError::Eofwhen the reader closes / errors before the separator.HeaderReadError::Timeoutwhendeadlineexpires first.