modrinth / labrinth

Our Rust-based backend utilizing the actix-web framework to serve Modrinth's API.
https://modrinth.com
GNU Affero General Public License v3.0
513 stars 75 forks source link

Using anything other than released file name with classifiers in Maven backend gives HTTP 404 error #530

Open forkiesassds opened 1 year ago

forkiesassds commented 1 year ago

Describe the bug

When trying to get a mod using Maven with a classifier using a name other than the released file name gives a HTTP 404 error.

Steps to reproduce

  1. Go to api.modrinth.com/maven/maven/modrinth/[modname/modid]/[version/versionid]/[modname/modid]-[version/versionid]-[classifier].jar
  2. Get HTTP 404

Expected behavior

It shouldn't return HTTP 404 and instead should link to the file requested

Additional context

This doesn't happen if using api.modrinth.com/maven/maven/modrinth/[modname]/[version]/[released mod file name]-[version]-[classifier].jar or when not using classifiers.

Scarsz commented 5 months ago

Having this issue without even using classifiers...

<dependency>
    <groupId>maven.modrinth</groupId>
    <artifactId>axiom-paper-plugin</artifactId>
    <version>1.5.8</version>
    <scope>provided</scope>
</dependency>

Referencing exact artifact & version slugs doesn't work, either.

<dependency>
    <groupId>maven.modrinth</groupId>
    <artifactId>evkiwA7V</artifactId>
    <version>NJ4xMgjh</version>
    <scope>provided</scope>
</dependency>

https://api.modrinth.com/maven/maven/modrinth/axiom-paper-plugin/1.5.8/axiom-paper-plugin-1.5.8.jar 404

https://api.modrinth.com/maven/maven/modrinth/axiom-paper-plugin/1.5.8/AxiomPaper-1.5.8.jar works

Completely unusable with Maven at the moment.