Upgrade to ureq3#324
Open
algesten wants to merge 1 commit intoramosbugs:mainfrom
Open
Conversation
algesten
commented
Sep 10, 2025
| 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)?; |
Author
There was a problem hiding this comment.
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.
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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Disclaimed: I'm the author of ureq.
Close #307
ureq3 is based on the http crate, which means there isn't much code needed.