Skip to content

Installer: a download URL with a query string names the downloaded file with its query, which fails on Windows and keeps an archive from being extracted #2206

Done

Description

@lagergren

What happens

DownloadTask.extractFileName takes the name of the downloaded file from everything after the last / of the download URL, its query and fragment included. For a URL such as https://example.com/download/v1.0/server.jar?access_token=…, the file is named server.jar?access_token=…:

  • On Windows ? can't be in a file name, so the download fails.
  • On macOS and Linux the file gets that name. It keeps the query, a token included, in its name, and an archive such as server.zip?… isn't recognized by its extension, so it isn't extracted.

Signed or tokenized download URLs, and URLs such as GitLab's …/raw?ref=main or GitHub's …?raw=true, have a query.

Found by the Windows job of #2195, whose test downloads such a URL.

Expected

The file is named after the URL's path, without its query or fragment: server.jar.

Test

A download of …/server.jar?access_token=… installs server.jar, on every OS.

Activity

  1. added this to the 0.30.2 milestone on Nov 24, 2026
  2. added
    bug
    on Nov 24, 2026
  3. added 2 commits that reference this issue on Nov 24, 2026
    ba0f3e6
    fbc5878
  4. added a commit that references this issue on Nov 24, 2026
    269fbff
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    buginstall

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions