diff --git a/packages/node/src/proxy/parse-proxy-response.ts b/packages/node/src/proxy/parse-proxy-response.ts index a2c05b1dbe2c..afad0d2435f4 100644 --- a/packages/node/src/proxy/parse-proxy-response.ts +++ b/packages/node/src/proxy/parse-proxy-response.ts @@ -89,7 +89,7 @@ export function parseProxyResponse(socket: Readable): Promise<{ connect: Connect return; } - const headerParts = buffered.slice(0, endOfHeaders).toString('ascii').split('\r\n'); + const headerParts = buffered.subarray(0, endOfHeaders).toString('ascii').split('\r\n'); const firstLine = headerParts.shift(); if (!firstLine) { socket.destroy();