Commit f7452bc4 authored by indexzero's avatar indexzero Committed by Dominic Tarr

[fix] Dont use res.* in proxyWebSocketRequest

parent f0917a3f
...@@ -636,8 +636,7 @@ HttpProxy.prototype.proxyWebSocketRequest = function (req, socket, head, options ...@@ -636,8 +636,7 @@ HttpProxy.prototype.proxyWebSocketRequest = function (req, socket, head, options
location = this.proxyTable.getProxyLocation(req); location = this.proxyTable.getProxyLocation(req);
if (!location) { if (!location) {
res.writeHead(404); return socket.destroy();
return res.end();
} }
options.port = location.port; options.port = location.port;
...@@ -786,6 +785,7 @@ HttpProxy.prototype.proxyWebSocketRequest = function (req, socket, head, options ...@@ -786,6 +785,7 @@ HttpProxy.prototype.proxyWebSocketRequest = function (req, socket, head, options
path: req.url, path: req.url,
headers: req.headers, headers: req.headers,
}; };
var reverseProxy = agent.appendMessage(outgoing); var reverseProxy = agent.appendMessage(outgoing);
// //
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment