diff --git a/crates/snowbound/src/update.rs b/crates/snowbound/src/update.rs index 9140f5d241549dc45ade49b5b9e437afec24d748..d9a1571649741dd6ecd656aa4b90ba5804025cc4 100644 --- a/crates/snowbound/src/update.rs +++ b/crates/snowbound/src/update.rs @@ -348,7 +348,14 @@ fn download(path: &str, limit: u64) -> Result, String> { agent .get(&format!("{BASE}{path}")) .call() - .and_then(|mut response| response.body_mut().with_config().limit(limit).read_to_vec()) + .and_then(|mut response| { + // ureq refuses a body that reaches its limit, so an exact size needs one byte more. + response + .body_mut() + .with_config() + .limit(limit + 1) + .read_to_vec() + }) .map_err(|error| error.to_string()) }