Skip to content

Commit 04e07fd

Browse files
tkverndead-horse
authored andcommitted
test: Buffer() is deprecated due to security and usability issues. so use the Buffer.alloc() instead (#1321)
1 parent 130e363 commit 04e07fd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: test/response/writable.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ describe('res.writable', () => {
99
describe('when continuous requests in one persistent connection', () => {
1010
function requestTwice(server, done){
1111
const port = server.address().port;
12-
const buf = new Buffer('GET / HTTP/1.1\r\nHost: localhost:' + port + '\r\nConnection: keep-alive\r\n\r\n');
12+
const buf = Buffer.from('GET / HTTP/1.1\r\nHost: localhost:' + port + '\r\nConnection: keep-alive\r\n\r\n');
1313
const client = net.connect(port);
1414
const datas = [];
1515
client

0 commit comments

Comments
 (0)