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

Buffer deprecation warning #1555

Closed
silverbackdan opened this issue May 21, 2018 · 1 comment

Comments

@silverbackdan
Copy link

commented May 21, 2018

Summary

I have looked but I didn't manage to find this issue, it's probably a known issue but Buffer() is deprecated in the latest Node version:
https://github.com/axios/axios/blob/master/lib/adapters/http.js#L42
https://github.com/axios/axios/blob/master/lib/adapters/http.js#L44
https://github.com/axios/axios/blob/master/lib/adapters/http.js#L127

Node produces the warning
[DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.

Is this as simple as changing the 2 lines I can see to Buffer.from(...) instead of new Buffer(...) - if so, I'm happy to raise a PR if it's helpful.

Context

  • axios version: all - including current master branch
  • Environment: Node v10.1.0
@emilyemorehouse

This comment has been minimized.

Copy link
Member

commented Aug 9, 2018

This has been fixed and merged!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.