Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

replace WriteBody with Into<Body> #602

Open
dvic opened this issue Feb 9, 2019 · 0 comments
Open

replace WriteBody with Into<Body> #602

dvic opened this issue Feb 9, 2019 · 0 comments
Milestone

Comments

@dvic
Copy link
Contributor

dvic commented Feb 9, 2019

Can we replace WriteBody with a boxed Into<Body>? (or a custom trait). It seems that the whole response is now loaded into memory and I'd like to avoid that in some cases :-)

iron/src/response.rs

Lines 152 to 154 in 1909e5b

let mut body_contents: Vec<u8> = vec![];
try!(body.write_body(&mut body_contents));
*res.body_mut() = Body::from(body_contents);

This is probably also related to #423

@phlmn phlmn added this to the V-0.7 milestone Aug 15, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants