Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 67fa56568a
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| // A server may ignore Range. Only a complete response starting at zero is safe. | ||
| HttpStatusCode.OK -> range.first == 0L && response.contentLength() == expectedBytes | ||
| else -> false |
There was a problem hiding this comment.
Accept chunked full responses when Range is ignored
When the HEAD response supplies a size but the subsequent GET ignores Range: bytes=0-(N-1) and returns the full body using chunked transfer encoding, response.contentLength() is null, so this branch rejects the response before reading it. Ignoring a Range request and omitting Content-Length are both valid server behaviors, and the body loop can still validate the received byte count against the range-derived expectedBytes; as written, downloads from such no-range servers now fail with KetchError.Unsupported.
Useful? React with 👍 / 👎.
Test Results 821 files + 7 821 suites +7 5m 11s ⏱️ -19s Results for commit 67fa565. ± Comparison against base commit 48ed5c6. This pull request removes 1 and adds 67 tests. Note that renamed tests count towards both. |
HTTP downloads could accept incorrect range responses, lose final segment progress, miss live connection changes, or report an empty download as complete without creating or truncating its destination. This change fixes those cases and adds regression coverage through real Ktor connections and SQLite task storage.
Validation passed on this branch: 605 tests reported with zero failures (Gradle reused matching cached results where applicable), including freshly executed public HTTPS tests. Desktop and Android compilation also passed.
Public tests require internet access and fail on service outages rather than silently skipping. Android validation is compilation only; the file-accessor change has not been exercised on an Android device.