fidius-host::executor::body_tee
Rust
Tee/replay bodies for the egress response hook (FIDIUS-I-0035).
To honor ResponseDirective::RetryOnce,
the dispatch path must be able to send the guest’s request body a second
time — but an outgoing body streams to the wire once and is gone. The
TeeBody wrapper solves this without changing wire behavior: frames pass
through to the inner body untouched while their bytes are copied into a
side buffer, capped at REPLAY_CAP. Whether a retry is possible is
decided at response time from the capture’s terminal state (a bodiless
GET has no Content-Length, so a pre-dispatch size check would exclude the
most common retryable requests).