diff --git a/ttest.js b/ttest.js index 33da443e3..ca9334434 100644 --- a/ttest.js +++ b/ttest.js @@ -47,6 +47,15 @@ srv.on('upgrade', function(req, socket, head) { 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();