playframework / playframework/play-ws
Java APIs are not handling headers in a case insensitive way
Open
Nobody has claimed this yet.
status:backlog
- Dominant language
- Scala
- Stars
- 224
- Forks
- 92
- Avg merge
- 1d 19h
- Merged PRs (30d)
- 28
Description
API
Java
Expected Behavior
When adding headers like:
Map<String, List<String>> headers = new HashMap<>();
headers.put("key", Collections.singletonList("a"));
headers.put("KEY", Collections.singletonList("b"));
ws.url("http://example.com").setHeaders(headers);
Both "a" and "b" must be returned when calling getHeaderValues("key").
The same should apply to response headers.
Actual Behavior
Only "b" is present when calling getHeaderValues("key").
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 by locating the Java API implementations of setHeaders and getHeaderValues, then inspect how request and response headers are stored and looked up. Reproduce the example with both "key" and "KEY" and add or update coverage for each direction. Done means getHeaderValues("key") returns both values for request and response headers.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- api
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100