Permalink
Browse files

[fix] Dont use res.* in proxyWebSocketRequest

  • Loading branch information...
1 parent f0917a3 commit f7452bc42d963406f7ee19dfa353d72ce3252dd6 @indexzero indexzero committed with dominictarr Jul 30, 2011
Showing with 2 additions and 2 deletions.
  1. +2 −2 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);
//

0 comments on commit f7452bc

Please sign in to comment.