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

Avoid using deprecated Buffer constructor #5

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ChALkeR
Copy link

@ChALkeR ChALkeR commented Mar 3, 2018

Buffer.concat([]) returns an empty buffer all the way down to 0.8.x.

Alternative way would be to just use Buffer.alloc(0) and drop support for outdated Node.js versions.

Refs:
https://nodejs.org/api/deprecations.html#deprecations_dep0005_buffer_constructor

Tracking: nodejs/node#19079

@ChALkeR
Copy link
Author

ChALkeR commented Mar 20, 2018

2018-02-26 deps list (top 10):

Query: "http-deceiver@
6428597 webpack-dev-server
4905488 spdy
4561130 http-deceiver
704705  react-scripts
346392  restify
171334  swagger-ui
162159  laravel-mix
105546  resolve-scripts
86959   react-styleguidist
62882   angular-cli

@ChALkeR
Copy link
Author

ChALkeR commented Mar 25, 2018

Travis failure is probably unrelated, master is also failing.

@lamweili
Copy link

@indutny This should be merged as well, to patch all deprecation issues.

@lamweili
Copy link

lamweili commented Jun 9, 2022

cc: @jacobheun @daviddias @indutny

beenotung added a commit to beenotung/http-deceiver that referenced this pull request Dec 19, 2022
Buffer() is deprecated due to security and usability issues.
It is suggested to use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.


Also discussed in spdy-http2#5
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants