From 3d2350c54ff0fb9271f5fcfea1d23f22ad97c47c Mon Sep 17 00:00:00 2001 From: Arttu Liimola Date: Sun, 30 Aug 2015 22:30:09 +0300 Subject: [PATCH] Replaced Object.keys().map with for in loop. --- lib/http-proxy/passes/ws-incoming.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/http-proxy/passes/ws-incoming.js b/lib/http-proxy/passes/ws-incoming.js index eb77adf..1d57b78 100644 --- a/lib/http-proxy/passes/ws-incoming.js +++ b/lib/http-proxy/passes/ws-incoming.js @@ -118,7 +118,7 @@ var passes = exports; 'HTTP/1.1 101 Switching Protocols' ]; - Object.keys(proxyRes.headers).map(function(i) { + for(var i in proxyRes.headers) { if (util.isArray(proxyRes.headers[i])) { var a = proxyRes.headers[i]; var len = a.length; @@ -129,7 +129,7 @@ var passes = exports; } else { writeHead.push(i + ": " + proxyRes.headers[i]); } - }); + } socket.write(writeHead.join('\r\n') + '\r\n\r\n'); proxySocket.pipe(socket).pipe(proxySocket);