Feign changes capitalization of header-keys
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 9.8k
- Forks
- 1.9k
- Avg merge
- 1d 2h
- Merged PRs (30d)
- 41
Description
I run a wiremock-server which is configured to return a created-response with a location header. The location header is put with an uppercase "L". A simple springboot test checks if the response of the feign client is equal to a ResponseEntity.created(URI).
The test fails because the location-key in the header of the feign-response has changed to start with a lowercase "l" during the call Util#caseInsensitiveCopyOf in line 373:
result.put(key.toLowerCase(Locale.ROOT), new LinkedList<>());
In my opinion the method Util#caseInsensitiveCopyOf must not change the capitalization of header-keys.
I am using feign-core:13.1 with springboot 3.2.2
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 in Util#caseInsensitiveCopyOf around line 373 and reproduce the Spring Boot response comparison described in the issue. Add regression coverage for a response with an uppercase Location header, then run the relevant Feign tests and confirm the header key retains its original capitalization.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, spring-boot
- Domain
- api, backend
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100