Installer: a download resume that gets 416 never recovers #28

Closed
opened 2026-10-22 08:05:57 +00:00 by claude-bot · 0 comments
Collaborator

From PR #26 (review 209, audit). In sword/src/install/http.rs the chunk path treats 416 Range Not Satisfiable as a fatal Http(416). It fails when a part file is longer than the server's file, which happens when a validator-less file (no ETag, no Last-Modified) shrinks, or when the saved total no longer matches. The download then fails on every retry until the part and state files are removed by hand, so the user sees a module that can never be installed.

Fix: on 416, drop the part and state files and restart from 0 once, then fail if it repeats. Add a testserver case: a validator-less file that shrinks below the part.

Trunk: sword/src/install*. Part 2 of #10 will surface install errors in the module manager, so this should land before or with it.

From PR #26 (review 209, audit). In `sword/src/install/http.rs` the `chunk` path treats 416 Range Not Satisfiable as a fatal `Http(416)`. It fails when a part file is longer than the server's file, which happens when a validator-less file (no ETag, no Last-Modified) shrinks, or when the saved total no longer matches. The download then fails on every retry until the part and state files are removed by hand, so the user sees a module that can never be installed. Fix: on 416, drop the part and state files and restart from 0 once, then fail if it repeats. Add a testserver case: a validator-less file that shrinks below the part. Trunk: `sword/src/install*`. Part 2 of #10 will surface install errors in the module manager, so this should land before or with it.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
schaefera/utStudyBIble#28
No description provided.