Skip to content

Commit

Permalink
Replaced Object.keys().map with for in loop.
Browse files Browse the repository at this point in the history
  • Loading branch information
ArGGu authored and jcrugzz committed Aug 30, 2015
1 parent ca73208 commit 3d2350c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/http-proxy/passes/ws-incoming.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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);
Expand Down

0 comments on commit 3d2350c

Please sign in to comment.