Skip to content

Latest version API should support files without extensions #2611

Closed

Description

@moehreag

Request details

Currently, it is only possible for the REST API to return files with extensions. However, for binaries (in our case, binaries of this project: https://github.com/OrnitheMC/ornithe-installer-rs), which for macOS and linux do not have extensions, this produces issues.

As a workaround, we currently use .bin as the extension for these targets though this is not ideal and possibly confusing.

Ideally it would be possible for the /api/maven/latest/ group of routes to also allow empty extensions. Right now, using no extension parameter only searches for .jar files (as documented) but using an empty string as the extension parameter value results in a dot still being added which I think happens at this point:

val suffix = version + (if (classifier != null) "-$classifier" else "") + "." + extension

I would propose for reposilite to not add this dot if the extension parameter is an empty string, this would not change the default and as such is less likely to break expected behavior.

I am not sure in which other ways having artifacts without extensions may produce issues apart from this, for example regarding repository mirroring and extension filters.

If you have other ideas to solve this problem please share them, this may not be the best option.

Activity

  1. added
    enhancement
    and removed on May 2, 2026
  2. dzikoysk commented on May 2, 2026

    @dzikoysk
    Owner

    Passing empty string here is currently considered as undefined behavior, so I think your proposal makes sense. I also added a special modifier to the mirror config called <none>, so we can whitelist such files too.

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

    enhancement

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions