mirror of
https://github.com/nodejs/node.git
synced 2024-11-21 10:59:27 +00:00
tls: add 'new' keyword for Array constructor call
PR-URL: https://github.com/nodejs/node/pull/8514 Reviewed-By: Brian White <mscdex@mscdex.net> Reviewed-By: Prince John Wesley <princejohnwesley@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
This commit is contained in:
parent
db1087c975
commit
30701a72c0
@ -29,7 +29,7 @@ exports.getCiphers = internalUtil.cachedResult(() => {
|
||||
// Convert protocols array into valid OpenSSL protocols list
|
||||
// ("\x06spdy/2\x08http/1.1\x08http/1.0")
|
||||
function convertProtocols(protocols) {
|
||||
const lens = Array(protocols.length);
|
||||
const lens = new Array(protocols.length);
|
||||
const buff = Buffer.allocUnsafe(protocols.reduce((p, c, i) => {
|
||||
var len = Buffer.byteLength(c);
|
||||
lens[i] = len;
|
||||
|
Loading…
Reference in New Issue
Block a user