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

Old version of agent-base breaks http.request #1552

Closed
gabegorelick opened this issue Mar 16, 2021 · 0 comments · Fixed by #1553
Closed

Old version of agent-base breaks http.request #1552

gabegorelick opened this issue Mar 16, 2021 · 0 comments · Fixed by #1553
Labels
t/bug Something isn't working

Comments

@gabegorelick
Copy link
Contributor

Describe the bug
This bug is documented in many places, including TooTallNate/node-proxy-agent#54. In summary, agent-base, which is transitively loaded via proxy-agent and a few other dependencies, patches http.request. But old versions are not compatible with recent (Node 10+) changes to the API. This can cause hard to track down bugs when any code in the same process as spectral calls http.request(url, options, callback).

To Reproduce

  1. Load spectral, causing its version of agent-base to be loaded.
  2. Call http.request(url, options, callback)

See TooTallNate/node-agent-base#35 for some more background.

Expected behavior
http.request(url, options, callback) works.

Additional context
TooTallNate/node-proxy-agent#55
https://github.com/TooTallNate/node-proxy-agent/releases/tag/4.0.0

@gabegorelick gabegorelick added the t/bug Something isn't working label Mar 16, 2021
gabegorelick added a commit to gabegorelick/spectral that referenced this issue Mar 17, 2021
P0lip pushed a commit that referenced this issue Mar 17, 2021
P0lip pushed a commit that referenced this issue Apr 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
t/bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant