playframework / playframework/play-ws
Can't override `Content-Type` once it's set
Nobody has claimed this yet.
- Dominant language
- Scala
- Stars
- 224
- Forks
- 92
- Avg merge
- 1d 19h
- Merged PRs (30d)
- 28
Description
When the body of a request is set the Content-Type header is derived from the actual payload.
Once set, the Content-Type can't be overriden.
This is preventing advanced users from managing the serialization themselves, then provide (e.g.) a ByteString and finally set the the Content-Type manually.
That is the case of Lagom.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the referenced play-ws commit and the Content-Type handling used by Lagom's ClientServiceCallInvoker.scala. Trace how a request body and manually supplied header are processed, then verify that a ByteString payload can retain an explicitly set Content-Type.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- scala
- Domain
- api, backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100