playframework / playframework/play-ws
Some headers keys in 2.8.1 are in lowercase
Nobody has claimed this yet.
- Dominant language
- Scala
- Stars
- 224
- Forks
- 92
- Avg merge
- 1d 19h
- Merged PRs (30d)
- 28
Description
Header names: some in lowercase
We just upgraded our play apps from 2.6.6 to 2.8.1
On our test environments we saw 502 errors coming back from other servers we call via play ws.
It seems that the newer version some headers are now in lower case.
Result from test with 2.8.1:
POST / HTTP/1.1
Content-Type: text/xml;charset=UTF-8
content-length: 340
host: localhost:9001
accept: */*
user-agent: AHC/2.1
result from 2.6.6:
POST / HTTP/1.1
Content-Type: text/xml;charset=UTF-8
Content-Length: 340
Host: localhost:9001
Accept: */*
User-Agent: AHC/2.0
Our endpoint broke on the content-length (lowercase) header key.
We created a workaround by explicitly setting the header with the key in the right format ("Content-Length"), but as some keys are in lower keys, and I think the RFC mentions them with first letter in uppercase, this might be a bug.
Play WS Version (migrated from 2.6.6 to 2.8.1
We migrated from 2.6.6 to 2.8.1 and encountered above issue.
API (Scala / Java / Neither / Both)
Scala
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
Reproduce the two request examples against Play WS 2.8.1 and 2.6.6, then trace the header-writing path used by the HTTP client. Confirm the expected behavior for the reported Content-Length case and add a regression test that distinguishes the versions.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, scala
- Domain
- networking
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 28/100