Downloading https://dl.fbaipublicfiles.com/fasttext/supervised-models/lid.176.bin tends to fail midway through if rustls and http2_adaptive_window are used.
#[tokio::main]asyncfnmain() -> Result<(),Box<dyn std::error::Error>>{let url = "https://dl.fbaipublicfiles.com/fasttext/supervised-models/lid.176.bin".parse()?;let https = hyper_rustls::HttpsConnector::with_native_roots();let client: hyper::Client<_, hyper::Body> = hyper::Client::builder().http2_adaptive_window(true).build(https);letmut response = client.get(url).await?;
hyper::body::to_bytes(response.body_mut()).await?;Ok(())}[dependencies]
hyper = { version = "0.14.7", features = ["http2"] }
hyper-rustls = "0.22.1"tokio = { version = "1.5.0", features = ["macros", "rt-multi-thread"] }Outputs:
Error: hyper::Error(Body, Error { kind: Io(Kind(BrokenPipe)) })
It fails consistently on my Debian machine. It fails inconsistently on @austinbutler's macOS and Arch Linux machines, see ducaale/xh#135.
I can't reproduce it when using reqwest's native-tls feature, so it's possible the real problem is somewhere in hyper-rustls or rustls itself.
I don't know if http2_adaptive_window is really vital.
Downloading https://dl.fbaipublicfiles.com/fasttext/supervised-models/lid.176.bin tends to fail midway through if rustls and
http2_adaptive_windoware used.Outputs:
It fails consistently on my Debian machine. It fails inconsistently on @austinbutler's macOS and Arch Linux machines, see ducaale/xh#135.
I can't reproduce it when using reqwest's
native-tlsfeature, so it's possible the real problem is somewhere in hyper-rustls or rustls itself.I don't know if
http2_adaptive_windowis really vital.