Skip to content

Differential download falls back to full download on GitHub Releases due to multi-range request (501 Not Implemented) #232

Description

@rekcahdev

Description

GitHub Releases (Varnish CDN) advertises accept-ranges: bytes but returns 501 Not Implemented for multi-range requests. electron-updater sends all changed blocks as a single multi-range request → GitHub rejects it → falls back to full download.

In my case, only 7 ranges / 3.3 MB (3%) needed downloading out of a 106 MB installer. The blockmap diff worked perfectly, but the download fell back to the full file.

Log:

File has 162 changed blocks
Full: 108,358.93 KB, To download: 3,327.3 KB (3%)
Cannot download differentially, fallback to full download: HttpError: 501
Headers: { "accept-ranges": "bytes", "server": "Varnish" }
Request

Before falling back to full download on 501, retry using sequential single-range requests (one per block). This would work fine on GitHub Releases and benefit the majority of Electron developers using it as free hosting.

Alternatively expose a singleRangeMode: true option in setFeedURL config for explicit opt-in.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions