Skip to content

Commit

Permalink
test: Buffer() is deprecated due to security and usability issues. so…
Browse files Browse the repository at this point in the history
… use the Buffer.alloc() instead (#1321)
  • Loading branch information
tkvern authored and dead-horse committed Apr 16, 2019
1 parent 130e363 commit 04e07fd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion test/response/writable.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ describe('res.writable', () => {
describe('when continuous requests in one persistent connection', () => {
function requestTwice(server, done){
const port = server.address().port;
const buf = new Buffer('GET / HTTP/1.1\r\nHost: localhost:' + port + '\r\nConnection: keep-alive\r\n\r\n');
const buf = Buffer.from('GET / HTTP/1.1\r\nHost: localhost:' + port + '\r\nConnection: keep-alive\r\n\r\n');
const client = net.connect(port);
const datas = [];
client
Expand Down

0 comments on commit 04e07fd

Please sign in to comment.