arthurnn / arthurnn/twirp-ruby
Allow specifying charset in the content-type header
- Dominant language
- Ruby
- Stars
- 163
- Forks
- 61
- PR merge metrics
- No merged PRs in 30d
Description
Some HTTP clients always append charset to the content-type header e.g., `content-type: application/json; charset=utf8`. Requests made by those clients are rejected because of the content-type mismatch.
Twirp only allows the content-type header exactly matches one of `aplication/json`, `application/json; strict=true` or `application/probobuf`. This seems too strict, can we relax this constraint?
Thank you.
Contributor guide
Research direction
The issue names no files or tests. Start by locating Twirp's content-type validation and its existing request tests, then compare the accepted media types with clients that append charset. Done means the reported charset-bearing content type is accepted without weakening unrelated content-type checks, with coverage for that header form.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- ruby
- Domain
- api
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100