mirror of
https://github.com/http-party/node-http-proxy.git
synced 2025-12-08 20:59:18 +00:00
write
This commit is contained in:
parent
1a7bef0cda
commit
f97c0c6167
9
ttest.js
9
ttest.js
@ -47,6 +47,15 @@ srv.on('upgrade', function(req, socket, head) {
|
|||||||
|
|
||||||
|
|
||||||
socket.pipe(sock).pipe(socket);
|
socket.pipe(sock).pipe(socket);
|
||||||
|
//req.pipe(r).pipe(socket);
|
||||||
|
/*console.log(hd.toString('utf-8'));
|
||||||
|
var str = Object.keys(res.headers).map(function(i) {
|
||||||
|
return i + ": " + res.headers[i];
|
||||||
|
}).join('\r\n');
|
||||||
|
socket.write("HTTP/1.1 101 Switching Protocols\r\n" + str);
|
||||||
|
|
||||||
|
socket.write(hd);
|
||||||
|
socket.pipe(sock).pipe(socket);*/
|
||||||
});
|
});
|
||||||
|
|
||||||
r.end();
|
r.end();
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user