Skip to content

fix: 416 HTTP error deleting local files fix#2139

Open
Moyasee wants to merge 1 commit intomainfrom
fix/download-finish
Open

fix: 416 HTTP error deleting local files fix#2139
Moyasee wants to merge 1 commit intomainfrom
fix/download-finish

Conversation

@Moyasee
Copy link
Copy Markdown
Contributor

@Moyasee Moyasee commented Apr 5, 2026

When submitting this pull request, I confirm the following (please check the boxes):

  • I have read the Hydra documentation.
  • I have checked that there are no duplicate pull requests related to this request.
  • I have considered, and confirm that this submission is valuable to others.
  • I accept that this submission may not be used and the pull request may be closed at the discretion of the maintainers.

Fill in the PR content:

Updated src/main/services/download/js-http-downloader.ts so HTTP 416 no longer deletes the local file and restarts from 0.
New behavior on 416 during resume:
If server Content-Range says local size already equals remote total, it marks download as complete.
Otherwise, it throws an error and keeps the local file intact (no forced zero restart).
Added a helper to parse total size from Content-Range: bytes */ for this decision path.

@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud bot commented Apr 5, 2026

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant