Replaced Object.keys().map with for in loop.

This commit is contained in:
Arttu Liimola 2015-08-30 22:30:09 +03:00 committed by Jarrett Cruger
parent ca73208749
commit 3d2350c54f

View File

@ -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);