From 9ffccbbee0705d77fefa54a2cc1670a25a3dab7a Mon Sep 17 00:00:00 2001 From: clover caruso Date: Wed, 30 Sep 2026 03:27:17 -0700 Subject: [PATCH] fix(update): accept an archive of exactly its published size ureq refuses a body that reaches its read limit, so every update download failed as unreachable. Assisted-by: claude-opus-5.5 --- crates/snowbound/src/update.rs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) 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()) } -- 2.54.0