Skip to content

Commit

Permalink
[fix] Dont use res.* in proxyWebSocketRequest
Browse files Browse the repository at this point in the history
  • Loading branch information
indexzero authored and dominictarr committed Aug 2, 2011
1 parent f0917a3 commit f7452bc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/node-http-proxy.js
Expand Up @@ -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;
Expand Down Expand Up @@ -786,6 +785,7 @@ HttpProxy.prototype.proxyWebSocketRequest = function (req, socket, head, options
path: req.url,
headers: req.headers,
};

var reverseProxy = agent.appendMessage(outgoing);

//
Expand Down

0 comments on commit f7452bc

Please sign in to comment.