microsoft / microsoft/playwright-java
[Feature]: allow to define multiple times the same header in route.fulfill
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 1.6k
- Forks
- 298
- Avg merge
- 3d 2h
- Merged PRs (30d)
- 14
Description
🚀 Feature Request
There is currently no way to define multiple times the same header in route.fulfill.
I first hoped I could trick it by using different cases but com/microsoft/playwright/impl/RouteImpl.java:214 uses headers.put(h.getKey().toLowerCase(), h.getValue());
I would expect that I can define headers in both ways, via Map<String, String> or via List<HttpHeader> (likewise one can use response.allHeaders() and response.headersArray()
Example
I have a test where I want to make sure that my implementation to detect multiple headers work. That's why I use route.fulfill and would like to define a header multiple times.
Motivation
see above
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 com/microsoft/playwright/impl/RouteImpl.java at line 214 and trace how route.fulfill handles Map<String, String> and List. Compare the behavior with response.allHeaders() and response.headersArray(); done means route.fulfill can preserve repeated header names through both requested input forms.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- api, testing
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100