Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

http(s)Agent not sent properly to follow-redirects #2546

Closed
mhassan1 opened this issue Nov 13, 2019 · 1 comment
Closed

http(s)Agent not sent properly to follow-redirects #2546

mhassan1 opened this issue Nov 13, 2019 · 1 comment

Comments

@mhassan1
Copy link

Describe the bug
In #2426, axios started passing agents to follow-redirects; however, the documentation for follow-redirects shows the shape of agents differently than what axios is passing. It means that an alternative agent is not correctly resolved by follow-redirects.

To Reproduce
Pass in an httpsAgent with an invalid configuration, which should cause axios.request to reject. In 0.19.0, it rejects; on master, it does not. See code snippet below.

require('axios')({
  url: 'https://postman-echo.com/get',
  httpsAgent: new require('https').Agent({
    ciphers: 'does-not-exist'
  })
}).catch(err => console.error(err.message))

Expected behavior
httpsAgent should be passed to follow-redirects

Environment:

  • Axios Version: master (unreleased 0.19.1)
  • OS: OSX 10.15
  • Node 8
@chinesedfan
Copy link
Collaborator

Solved by #1904 and released to 0.19.1 yet.

@axios axios locked and limited conversation to collaborators May 22, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants