-
Notifications
You must be signed in to change notification settings - Fork 173
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
Reading a gzipped response hangs forever upon reaching the end of the response #575
Comments
Please add |
I'm running into the same problem with the newly-released # rustup show
Default host: x86_64-unknown-linux-gnu
rustup home: /usr/local/rustup
stable-x86_64-unknown-linux-gnu (default)
rustc 1.66.0 (69f9c33d7 2022-12-12) Here is what
This can be reproduced with a Cargo.toml: [package]
name = "ureqtest"
version = "0.1.0"
edition = "2021"
[dependencies]
env_logger = "*"
[dependencies.ureq]
version = "=2.6.0"
default-features = false
features = [ "tls", "gzip" ] main.rs: fn main() {
env_logger::init();
let res = ureq::get("https://github.com/Fyrd/caniuse/raw/main/fulldata-json/data-2.0.json")
.set("user-agent", "Mozilla/5.0")
.call()
.expect("Call fail.");
let mut out: Vec<u8> = Vec::new();
res.into_reader().read_to_end(&mut out).expect("Read fail.");
println!("{}", out.len()); // Never makes it here.
} Trying to limit the reader with |
Excellent. Thanks for the detailed report. I'll reproduce this when I get home. |
Fix is published in ureq 2.6.1. Thanks again for the detailed repro case! It helped me find the problem very quickly. |
Thanks for the quick fix @jsha! That seems to have done the trick. |
Hello,
i use the actual git version (that solves a problem with the cookiestore for me) and rust compiles without an error but the code hang on every function call like:
He hangs and i must break the compiled program.
The text was updated successfully, but these errors were encountered: