Expand description
Parse a CGI child’s stdout into an http::Response, then stream
the body through http_body::Body. The other half of a CGI
gateway — building the RFC 3875 environment for the child —
lives in the cgi-request crate; pair them when you need both
directions.
See the crate-level README for what is and isn’t covered here.
Structs§
- CgiResponse
Body - Streaming body for a CGI response: yields the leftover bytes
(from the post-header read) first, then reads the rest from the
child’s stdout to EOF. A
total_deadlinecaps the total streaming time; mid-body the nextpoll_framepast the deadline returns anio::Error.
Enums§
- Header
Read Error - Errors from
read_until_header_end. - Parse
Error - Errors from
parse_response_headers.
Functions§
- parse_
response_ headers - Build an
http::response::Builderfrom an RFC 3875 header block. Status resolution: - read_
until_ header_ end - Read from
stdoutuntil the RFC 3875 header / body separator (\r\n\r\n), or untildeadline. Returns the header block (up to and including the separator), the leftover bytes that arrived in the sameread()past the separator, and the still-open reader for downstream body streaming.