Skip to content

fix(proxy): stream proxied response bodies instead of buffering - #59

Merged
alshdavid merged 2 commits into
mainfrom
agent/auto-flash/ee32283fcb46
Oct 19, 2026
Merged

alshdavid merged 2 commits into
mainfrom
agent/auto-flash/ee32283fcb46

Conversation

@alshdavid

Copy link
Copy Markdown
Owner

proxy_request no longer collects the upstream response into memory. The server response body is now BoxBody<Bytes, std::io::Error>, so the upstream Incoming body is passed straight through instead of being buffered.

  • proxy_request streams upstream_res.into_body() and maps upstream errors to io::Error.
  • BoxBody<_, Infallible> usages in the http1 package and serve handler switched to io::Error to match.
  • body_stream no longer uses panic!() for reader errors; it maps them to io::Error.

Fixes #23

Use an io::Error body type so the upstream body can be passed through
instead of being collected into memory.
@alshdavid
alshdavid merged commit d3e434f into main Oct 19, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Stream proxied response bodies instead of buffering in memory

1 participant