mirror of
https://github.com/http-party/node-http-proxy.git
synced 2025-12-08 20:59:18 +00:00
Replaced Object.keys().map with for in loop.
This commit is contained in:
parent
ca73208749
commit
3d2350c54f
@ -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);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user