Skip to main content

copy_request_body

Function copy_request_body 

Source
pub async fn copy_request_body<R, W>(
    reader: &mut R,
    writer: &mut W,
    kind: RequestBodyKind,
    limits: &BodyCopyLimits,
) -> Result<BodyCopyReport, HttpError>
where R: AsyncRead + Unpin, W: AsyncWrite + Unpin,
Expand description

Copy a request body from reader to writer.

For Content-Length bodies, copies exactly len bytes. For chunked bodies, parses and forwards chunks with proper bounds. Returns byte counts for accounting.