Compare commits

...

11 Commits

Author SHA1 Message Date
Guillermo Rauch
cfbae2ac15 Release 0.6.16 2011-03-04 09:06:01 -08:00
Guillermo Rauch
1072add73f Merge branch 'master' of https://github.com/tifroz/Socket.IO-node into tifroz-master 2011-03-04 09:03:43 -08:00
Guillermo Rauch
5308452b8a Release 0.6.15 2011-02-23 11:20:33 -08:00
mlinnell
2ee09436ce Setting WebSocket buffer to empty once nonce is received (intended to include in previous commit) 2011-02-23 19:01:35 +00:00
mlinnell
d2ecaff462 Fixed memory leak in WebSocket transport.
The WebSocket.buffer would continue to grow, unabated, for each new message.
This buffer is now only utilized to process the nonce, and is set to empty (and no longer filled) once nonce has been received.
Parser instance appears to handle all message buffering, instead of WebSocket entity.
2011-02-23 18:55:24 +00:00
Guillermo Rauch
023566e03b Release 0.6.14 2011-02-22 11:09:42 -08:00
Shripad K
c306a3c303 fixed minor bug in xhr-polling, xhr-multipart, htmlfile. (this.listener.options.log -> self.listener.options.log) 2011-02-22 17:34:39 +05:30
Guillermo Rauch
80f1d9780b Release 0.6.13 2011-02-18 15:18:46 -08:00
Guillermo Rauch
ff10eeecba Fixed references to listener when logging 2011-02-18 15:18:10 -08:00
Guillermo Rauch
cd9cbb500b Fixed listener reference 2011-02-18 15:17:14 -08:00
tifroz
d648fc5a72 Allow x-domain xhr-polling with Origin: null for Chrome/Safari 2011-02-16 00:16:41 -08:00
7 changed files with 29 additions and 11 deletions

View File

@@ -1,4 +1,24 @@
0.6.16 / 2011-03-04
===================
* Fixed cross domain xhr-polling in Safari [tifroz]
0.6.15 / 2011-02-23
===================
* Fixed memory leak in WebSocket transport [belorion]
0.6.14 / 2011-02-18
===================
* Fixed logging scope issue [shripad]
0.6.13 / 2011-02-18
===================
* Fixed references to listener when logging
0.6.12 / 2011-02-18
===================

View File

@@ -23,4 +23,4 @@ exports.Listener = require('./listener');
* Version
*/
exports.version = '0.6.12';
exports.version = '0.6.16';

View File

@@ -33,7 +33,7 @@ HTMLFile.prototype._onConnect = function(req, res){
var msg = qs.parse(body);
self._onMessage(msg.data);
} catch(e){
listener.options.log('htmlfile message handler error - ' + e.stack);
self.listener.options.log('htmlfile message handler error - ' + e.stack);
}
res.writeHead(200, {'Content-Type': 'text/plain'});
res.write('ok');

View File

@@ -99,18 +99,16 @@ WebSocket.prototype._onConnect = function(req, socket){
this.buffer = "";
this.connection.addListener('data', function(data){
self.buffer += data;
if (self.waitingForNonce) {
self.buffer += data;
if (self.buffer.length < 8) { return; }
// Restore the connection to utf8 encoding after receiving the nonce
self.connection.setEncoding('utf8');
self.waitingForNonce = false;
// Stuff the nonce into the location where it's expected to be
self.upgradeHead = self.buffer.substr(0,8);
self.buffer = self.buffer.substr(8);
if (self.buffer.length > 0) {
self.parser.add(self.buffer);
}
self.buffer = '';
if (self._proveReception(self._headers)) { self._payload(); }
return;
}

View File

@@ -47,7 +47,7 @@ Multipart.prototype._onConnect = function(req, res){
var msg = qs.parse(body);
self._onMessage(msg.data);
} catch(e){
listener.options.log('xhr-multipart message handler error - ' + e.stack);
self.listener.options.log('xhr-multipart message handler error - ' + e.stack);
}
res.writeHead(200, headers);
res.write('ok');

View File

@@ -49,7 +49,7 @@ Polling.prototype._onConnect = function(req, res){
var msg = qs.parse(body);
self._onMessage(msg.data);
} catch(e){
listener.options.log('xhr-polling message handler error - ' + e.stack);
self.listener.options.log('xhr-polling message handler error - ' + e.stack);
}
res.writeHead(200, headers);
res.write('ok');
@@ -69,7 +69,7 @@ Polling.prototype._write = function(message){
var headers = {'Content-Type': 'text/plain; charset=UTF-8', 'Content-Length': Buffer.byteLength(message)};
// https://developer.mozilla.org/En/HTTP_Access_Control
if (this.request.headers.origin && this._verifyOrigin(this.request.headers.origin)){
headers['Access-Control-Allow-Origin'] = this.request.headers.origin;
headers['Access-Control-Allow-Origin'] = (this.request.headers.origin === 'null' ? '*' : this.request.headers.origin);
if (this.request.headers.cookie) headers['Access-Control-Allow-Credentials'] = 'true';
}
this.response.writeHead(200, headers);

View File

@@ -1,6 +1,6 @@
{ "name" : "socket.io"
, "description" : "The cross-browser WebSocket"
, "version" : "0.6.12"
, "version" : "0.6.16"
, "author" : "LearnBoost"
, "licenses" :
[ { "type" : "MIT"