feross / feross/simple-get

Redirect bug

Open
#50 0 comments 0 reactions 0 assignees Claimed by @LinusU View on GitHub
Dominant language
JavaScript
Stars
402
Forks
49
PR merge metrics
No merged PRs in 30d

Description

Hello again, sorry for spam.

I have noticed the redirection system is somewhat faulty. When redirecting, it does not call url.resolve, so redirects will entirely malfunction if you got a relative path.

To solve this, navigate to the line within index.js, containing the comment `// Follow 3xx redirects` and update it to
`opts.url = url.resolve(url.format(opts), res.headers.location); // Follow 3xx redirects`

Again, sorry for spamming the issues section.

Regards.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.