OpenFeign / OpenFeign/feign

The comma is removed when the header expands the variable

Open
#1,488 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

feedback provided
Dominant language
Java
Stars
9.8k
Forks
1.9k
Avg merge
1d 2h
Merged PRs (30d)
41

Description

I use SpringCloud, and the corresponding feign version is 10.12.

@GetMapping("/multi")
List<String> multiGet(@RequestHeader("Form-Delimiter") @Nullable String delimiter, @RequestParam("keys") String keys);

The keys are separated by delimiter.

When I pass a comma as the Delimiter, the result of the request is always not as expected.

After debugging, it is found that HeaderTemplate will remove the comma at the end.

openfeign

Please solve this problem, I think it will make others doubt his code.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing HeaderTemplate's variable expansion for the Form-Delimiter header, using the Java example in the issue as the reproduction case. Verify that a comma delimiter is preserved through expansion and that the generated request contains the expected delimiter; add or update a focused test if the relevant test location is found.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, spring
Domain
api, backend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.