modrinth / labrinth

Our Rust-based backend utilizing the actix-web framework to serve Modrinth's API.

Home Page:https://modrinth.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

`GET /v2/projects` does not support certain symbols that `GET /v2/project/{id|slug}` supports

CCheukKa opened this issue · comments

Describe the bug

If a slug contains certain symbols, GET /v2/projects does not return that project as if it doesn't exist despite GET /v2/project/{id|slug} supporting it without issue. HTML encoding can be used as a workaround.

So far, I have encountered this issue for +.

Steps to reproduce

I'll use Shulker+ as an example since that is where I first encountered the issue.

  1. Make a GET request to https://api.modrinth.com/v2/projects?ids=["shulker+"]
  • Response: []

Expected behaviour

The response should go through like usual.
For reference, making a GET request to https://api.modrinth.com/v2/project/shulker+ yields a normal response.

Additional context

HTML encoding can be used as a workaround: https://api.modrinth.com/v2/projects?ids=["shulker%2B"], despite this not being necessary for GET /v2/project/{id|slug}.