Skip to content

Conversation

@algesten
Copy link

@algesten algesten commented Sep 10, 2025

Disclaimed: I'm the author of ureq.

Close #307

ureq3 is based on the http crate, which means there isn't much code needed.

response.into_reader().read_to_end(&mut body)?;
let (parts, body) = response.into_parts();
let mut body_vec = Vec::new();
body.into_reader().read_to_end(&mut body_vec)?;
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this should be changed to

let body_vec = body.read_to_vec()?;

That function has a 10MB cap, which is a safety mechanism to avoid a misbehaving remote server causing problems.

I struggled to find a good Error variant to use though.

@algesten algesten mentioned this pull request Sep 10, 2025
@ramosbugs
Copy link
Owner

thanks for the PR! however, as I indicated here, this is a breaking change that will either need to wait for the next major version bump (not planned in the near future) or be gated behind a feature flag without breaking support for ureq 2.x clients.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants