osu-tournament-rating / otr-api

API powering osu! Tournament Rating
https://otr.stagec.xyz/
GNU General Public License v3.0
4 stars 2 forks source link

Space should be encoded as `%20` in API calls #238

Closed hburn7 closed 1 month ago

hburn7 commented 3 months ago

When looking for [ MILK_Jiang], the following occurs:

Client with identity 20 on scheme http GET staging.otr.stagec.xyz/api/v1/players/%5B_MILK_Jiang%5D/info with body 'User with key [_MILK_Jiang] does not exist...' returned status 404

The first space is replaced with an underscore when manually typing into the url. Not a super high priority but something we should be aware of.

myssto commented 3 months ago

Title is a bit misleading because this is more of an issue of how URI components are encoded. Making a request to /api/v1/players/%5B%20MILK_Jiang%5D/info produces the correct response. The space needs to be encoded as %20 for it to be parsed correctly. I don't think it should fall on the API to correct this at all, but possibly making a note in the docs and letting the web team know would be good. @AkinariHex

hburn7 commented 3 months ago

Ah ok, will transfer.

hburn7 commented 2 months ago

[ MILK_Jiang] fails to return on dev.

myssto commented 2 months ago

this guy

hburn7 commented 1 month ago

The API handles https://staging.otr.stagec.xyz/users/[ MILK_Jiang] perfectly fine, this seems like a non-issue. Also handles [%20MILK