diff --git a/lib/node-http-proxy.js b/lib/node-http-proxy.js index 150d48419..e1c95f17e 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); //