OpenFeign / OpenFeign/feign

MockClient decode url before matching

Open
#787 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

When executing a request, inside this method
public synchronized Response execute(Request request, Request.Options options)
requestKey is created based on the request. However, it decodes the url so that we cannot test the actual url will be sent by the client.

For example, if my request url contains %2F like /a%2Fb, the requestKey only contains /. When I expect the final url which is sent to server should be /a%2Fb. What I get from mockClient is a url /a/b

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 at MockClient's public synchronized Response execute(Request request, Request.Options options) method and inspect how requestKey is created from the request URL. Reproduce the /a%2Fb case, then add or update a regression test so matching preserves the encoded URL and verifies the URL exposed by MockClient.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
testing
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.