MockClient decode url before matching
Nobody has claimed this yet.
- 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
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 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