itsthatguy / itsthatguy/avatars-api-middleware
extensions affect the returned avatar
- Dominant language
- TypeScript
- Stars
- 745
- Forks
- 97
- PR merge metrics
- No merged PRs in 30d
Description
We previously had code in place that made the requests `/avatars/foo.png` and `/avatars/foo` "the same;" it was accomplished by simply stripping the extension out of the identifier. I removed this code because I thought it was silly, but I realize now that it's really a stopgap for #19.
Avatar-wise, the extension should _not_ affect the result. Long-term, it _should_ affect the content-type of the response.
The main reason to fix this sooner rather than later is that the .png toggle on the avatars site now behaves "weirdly," in that it actually changes the avatar being displayed.
Contributor guide
Research direction
Start by tracing the Express middleware that handles avatar identifiers and compare requests for /avatars/foo.png and /avatars/foo. Confirm that the extension no longer changes the selected avatar; the separate content-type behavior is described as longer-term work.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- api, backend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100