Permalink
Browse files

fixed bug in flushing data to connected clients

  • Loading branch information...
1 parent e27185d commit fe791e276afb988f6f206d42fb77e00e0fd7f03d @ashaffer ashaffer committed Jul 28, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/node-http-proxy/http-proxy.js
View
2 lib/node-http-proxy/http-proxy.js
@@ -680,7 +680,7 @@ HttpProxy.prototype.proxyWebSocketRequest = function (req, socket, head, buffer)
sdata = sdata.replace('ws:', 'wss:');
data = new Buffer(Buffer.byteLength(sdata)+bdata.length);
data.write(sdata, 0, Buffer.byteLength(sdata), 'utf8');
- data.write(bdata, Buffer.byteLength(sdata), bdata.length, 'binary');
+ bdata.copy(data, Buffer.byteLength(sdata), 0, bdata.length);
}
try {

0 comments on commit fe791e2

Please sign in to comment.