Switch from ureq to reqwest::blocking

This commit is contained in:
Richard Feldman 2022-11-21 15:01:43 -05:00
parent 0890725d1b
commit ea8bb8820b
No known key found for this signature in database
GPG key ID: F1F21AA5B1D9E43B
3 changed files with 387 additions and 29 deletions

View file

@ -17,7 +17,7 @@ flate2 = "1.0.24"
walkdir = "2.3.2"
blake3 = "1.3.1"
base64-url = "1.4.13"
ureq = "2.5.0"
reqwest = { version = "0.11.13", features = [ "blocking", "rustls-tls" ] }
bumpalo.workspace = true

View file

@ -1,4 +1,5 @@
use blake3::Hasher;
use reqwest::Method;
use std::io::{self, ErrorKind, Read, Write};
use crate::tarball::Compression;
@ -111,12 +112,10 @@ pub enum Problem {
actual: String,
},
IoErr(io::Error),
HttpErr(ureq::Error),
HttpErr(reqwest::Error),
InvalidUrl(UrlProblem),
/// The Content-Length header of the response exceeded max_download_bytes
DownloadTooBig(usize),
InvalidContentLengthHeader,
MissingContentLengthHeader,
DownloadTooBig(u64),
}
/// Download and decompress the given URL, verifying its contents against the hash in the URL.