Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,14 @@ All notable changes to ODM are documented here. The format is based on

## [Unreleased]

### Added

- Range requests send the file's `ETag` (only a strong one) or
`Last-Modified` as `If-Range`, and a resume checks them first. When the
file on the server has changed, the partial file is discarded and the
download starts again from the first byte. A `200` response whose range
already covers the whole file is kept when that validator still matches.

## [0.4.3] - 2026-10-19

### Added
Expand Down
15 changes: 13 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,11 @@ queues. It runs as a desktop app, or headless with a JSON API.
- A response that ends before its chunk is finished continues from the
last byte written. One that brings no bytes at all is retried with a
pause and gives up after the retry limit.
- Every range request carries the file's `ETag` (a strong one) or
`Last-Modified` as `If-Range`, and a resume checks them first. If the file
on the server has changed, the partial download is discarded and started
again from the first byte. A `200` for a range that already covers the
whole file is kept when that validator still matches.
- Servers that do not support ranges are fetched on a single stream.
- Global and per-download speed limits, plus an optional data cap per time
window.
Expand Down Expand Up @@ -209,8 +214,14 @@ only.
build the file before it answers. The other connections keep going.
4. **Finish.** The `.odmpart` file is renamed to the final name.

Each chunk's progress (`{id,start,end,done}`) is saved as JSON, so a restart
continues from the exact byte. Segmented ranges, byte-offset resume and chunk
Each chunk's progress (`{id,start,end,done}`) is saved as JSON, together with
the `ETag` and `Last-Modified` from the probe, so a restart continues from
the exact byte while the file on the server is unchanged. If `If-Range` fails
(a `200` with another validator), or a later probe reports a different
validator or size, ODM deletes the partial file and downloads the new one. A
`200` with the same validator is a server ignoring `Range`: it is kept when
the range already covers the whole file. A weak `ETag` is never sent as
`If-Range`. Segmented ranges, byte-offset resume and chunk
splitting are standard download-manager techniques. ODM implements them in
its own code.

Expand Down
Loading
Loading