Commit 45ef87e7 authored by Fedor Indutny's avatar Fedor Indutny Committed by indexzero

[websockets] add latest websockets support

parent 6c6fec09
......@@ -393,7 +393,7 @@ HttpProxy.prototype.proxyWebSocketRequest = function (req, socket, head, buffer)
//
// Setup the incoming client socket.
//
_socket(socket);
_socket(socket, true);
//
// On `upgrade` from the Agent socket, listen to
......@@ -663,7 +663,12 @@ HttpProxy.prototype.proxyWebSocketRequest = function (req, socket, head, buffer)
// request. This is small, and there's only ever one of
// it; no need for pause/resume.
//
// XXX This is very wrong and should be fixed in node's core
//
reverseProxy.write(head);
if (head && head.length === 0) {
reverseProxy._send('');
}
}
catch (ex) {
return proxyError(ex);
......
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