Skip to content

Commit f7452bc

Browse files
indexzerodominictarr
authored andcommitted
[fix] Dont use res.* in proxyWebSocketRequest
1 parent f0917a3 commit f7452bc

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/node-http-proxy.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -636,8 +636,7 @@ HttpProxy.prototype.proxyWebSocketRequest = function (req, socket, head, options
636636
location = this.proxyTable.getProxyLocation(req);
637637

638638
if (!location) {
639-
res.writeHead(404);
640-
return res.end();
639+
return socket.destroy();
641640
}
642641

643642
options.port = location.port;
@@ -786,6 +785,7 @@ HttpProxy.prototype.proxyWebSocketRequest = function (req, socket, head, options
786785
path: req.url,
787786
headers: req.headers,
788787
};
788+
789789
var reverseProxy = agent.appendMessage(outgoing);
790790

791791
//

0 commit comments

Comments
 (0)