OpenFeign / OpenFeign/feign

Parameter URL encoding is inconsistent with Feign 10

Open
#1,225 3 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

I have a project that works under Feign 9 but is broken in Feign 10.

Consider the following example:

interface ExampleClient {
  @RequestLine("GET /search?text={text}")
  void search(@Param("text") String text);
}

Most values are automatically encoded when passed through. But if there is a value that appears to match a pre-encoded hex value it will not be encoded correctly.

text = %example% works correctly
text = %address% is not encoded correctly

I assume the problem is that the %ad in address could be interpreted as a hex value so feign is attempting to infer that the value is already encoded. The issue is that there is no reliable way to pass through a value like %address% that looks like a hex value but actually is not.

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 with the Feign 10 parameter-encoding path used by the Java example and reproduce the difference between %example% and %address%. Compare the behavior with Feign 9 to identify the regression. Done means values such as %address% are encoded reliably without being mistaken for already encoded data.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
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.