OpenFeign / OpenFeign/feign

Some entities get encoded twice

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

Nobody has claimed this yet.

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

Description

Using feign-core:11.8 and feign-httpclient:11.8 and feign-form-spring:3.5.0

I am passing a smtp message id to a GET query parameter

When the input value is HelloWorld@mail.gmail.com

I see that the url called contains messageIds=%3CHelloWorld%40mail.gmail.com%3E
and the receiving webservice is getting the initial value

However when the value contains and "=" sign, for example Hello=World@mail.gmail.com
the request ends up containing messageIds=%253CHelloWorld%40mail.gmail.com%253E

the @ symbol still gets encoded only once as %40
But the < and > symbols are getting encoded twice, first to %3C and %3E the the "%" itself gets encoded again as %25
Which ends up %253C and %253E

The webservice consuming the value is then getting "%3CHelloWorld@mail.gmail.com%3E" instead of "HelloWorld@mail.gmail.com>"

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 reproducing the GET request with feign-core:11.8, feign-httpclient:11.8, and feign-form-spring:3.5.0 using values containing an equals sign, then compare the generated URL with the value received by the web service. Done means special characters are not encoded twice and the service receives the intended original value.

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
Needs clarification
Newbie friendliness
28/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.