Skip to content

Commit 3d2350c

Browse files
ArGGujcrugzz
authored andcommitted
Replaced Object.keys().map with for in loop.
1 parent ca73208 commit 3d2350c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/http-proxy/passes/ws-incoming.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ var passes = exports;
118118
'HTTP/1.1 101 Switching Protocols'
119119
];
120120

121-
Object.keys(proxyRes.headers).map(function(i) {
121+
for(var i in proxyRes.headers) {
122122
if (util.isArray(proxyRes.headers[i])) {
123123
var a = proxyRes.headers[i];
124124
var len = a.length;
@@ -129,7 +129,7 @@ var passes = exports;
129129
} else {
130130
writeHead.push(i + ": " + proxyRes.headers[i]);
131131
}
132-
});
132+
}
133133

134134
socket.write(writeHead.join('\r\n') + '\r\n\r\n');
135135
proxySocket.pipe(socket).pipe(proxySocket);

0 commit comments

Comments
 (0)