From f97c0c6167371c5ff92e6361b1df02e3fd5506d7 Mon Sep 17 00:00:00 2001 From: yawnt Date: Sat, 14 Sep 2013 10:22:31 +0200 Subject: [PATCH] write --- ttest.js | 9 +++++++++ 1 file changed, 9 insertions(+) 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();