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 · 3 comments
Closed

Buffer deprecation warning #1555

silverbackdan opened this issue May 21, 2018 · 3 comments

Comments

@silverbackdan
Copy link

silverbackdan 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
Copy link
Member

This has been fixed and merged!

@haiemh
Copy link

haiemh commented Apr 24, 2020

Why is this closed?

@jasonsaayman
Copy link
Member

Hi it seems that it has been merged, if you think there is still an issue please open a new issue this one seems pretty busy.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants