Redirects don't work if going to another server
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 58
- Forks
- 35
- Avg merge
- 22h 4m
- Merged PRs (30d)
- 10
Description
When making a request using JsonClient or StringClient, where the server returns a redirect status (such as 301), and the Location header is a different server than the one the initial request went to, then the new request that it tries goes to the new path but on the old server, not the new one.
It looks like StringClient (around line 122) updates the path for a new request, but not other needed properties like protocol/host/port.
Contributor guide
No contributing guide indexed for this repository
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 in lib/StringClient.js around line 122, then trace the corresponding redirect handling used by JsonClient. Check how a redirect Location is turned into the next request and identify which destination details are retained. Done means redirects to another server reach that server for both client types; add or update coverage where the repository’s existing tests cover redirects.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- api
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 50/100