From f7452bc42d963406f7ee19dfa353d72ce3252dd6 Mon Sep 17 00:00:00 2001 From: indexzero Date: Fri, 29 Jul 2011 22:27:59 -0400 Subject: [PATCH] [fix] Dont use res.* in proxyWebSocketRequest --- lib/node-http-proxy.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/node-http-proxy.js b/lib/node-http-proxy.js index 150d484..e1c95f1 100644 --- a/lib/node-http-proxy.js +++ b/lib/node-http-proxy.js @@ -636,8 +636,7 @@ HttpProxy.prototype.proxyWebSocketRequest = function (req, socket, head, options location = this.proxyTable.getProxyLocation(req); if (!location) { - res.writeHead(404); - return res.end(); + return socket.destroy(); } options.port = location.port; @@ -786,6 +785,7 @@ HttpProxy.prototype.proxyWebSocketRequest = function (req, socket, head, options path: req.url, headers: req.headers, }; + var reverseProxy = agent.appendMessage(outgoing); //