mirror of
https://github.com/socketio/socket.io.git
synced 2026-01-12 08:27:57 -05:00
Compare commits
17 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
cfbae2ac15 | ||
|
|
1072add73f | ||
|
|
5308452b8a | ||
|
|
2ee09436ce | ||
|
|
d2ecaff462 | ||
|
|
023566e03b | ||
|
|
c306a3c303 | ||
|
|
80f1d9780b | ||
|
|
ff10eeecba | ||
|
|
cd9cbb500b | ||
|
|
de8d573948 | ||
|
|
ea9e5ed2cc | ||
|
|
d648fc5a72 | ||
|
|
109a59ca9a | ||
|
|
d304ce19d1 | ||
|
|
f534a260b3 | ||
|
|
cff4669d57 |
32
History.md
32
History.md
@@ -1,4 +1,36 @@
|
||||
|
||||
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
|
||||
===================
|
||||
|
||||
* Fixed noDelay missing file descriptor problem
|
||||
|
||||
0.6.11 / 2011-02-15
|
||||
===================
|
||||
|
||||
* Fixed; Make sure to not execute any other connection operations after WebSocket
|
||||
write error.
|
||||
* Added more error logging
|
||||
|
||||
0.6.10 / 2011-02-09
|
||||
===================
|
||||
|
||||
|
||||
@@ -23,4 +23,4 @@ exports.Listener = require('./listener');
|
||||
* Version
|
||||
*/
|
||||
|
||||
exports.version = '0.6.10';
|
||||
exports.version = '0.6.16';
|
||||
|
||||
@@ -21,7 +21,9 @@ Flashsocket.init = function(listener){
|
||||
if (listeners.length === 0 && netserver){
|
||||
try {
|
||||
netserver.close();
|
||||
} catch(e){}
|
||||
} catch(e){
|
||||
listener.options.log('flashsocket netserver close error - ' + e.stack)
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
@@ -32,7 +32,9 @@ HTMLFile.prototype._onConnect = function(req, res){
|
||||
try {
|
||||
var msg = qs.parse(body);
|
||||
self._onMessage(msg.data);
|
||||
} catch(e){}
|
||||
} catch(e){
|
||||
self.listener.options.log('htmlfile message handler error - ' + e.stack);
|
||||
}
|
||||
res.writeHead(200, {'Content-Type': 'text/plain'});
|
||||
res.write('ok');
|
||||
res.end();
|
||||
|
||||
@@ -78,14 +78,14 @@ WebSocket.prototype._onConnect = function(req, socket){
|
||||
|
||||
try {
|
||||
this.connection.write(headers.concat('', '').join('\r\n'));
|
||||
this.connection.setTimeout(0);
|
||||
this.connection.setNoDelay(true);
|
||||
this.connection.setEncoding('utf-8');
|
||||
} catch(e){
|
||||
this._onClose();
|
||||
return;
|
||||
}
|
||||
|
||||
this.connection.setTimeout(0);
|
||||
this.connection.setNoDelay(true);
|
||||
this.connection.setEncoding('utf-8');
|
||||
|
||||
if (this.waitingForNonce) {
|
||||
// Since we will be receiving the binary nonce through the normal HTTP
|
||||
// data event, set the connection to 'binary' temporarily
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -46,7 +46,9 @@ Multipart.prototype._onConnect = function(req, res){
|
||||
try {
|
||||
var msg = qs.parse(body);
|
||||
self._onMessage(msg.data);
|
||||
} catch(e){}
|
||||
} catch(e){
|
||||
self.listener.options.log('xhr-multipart message handler error - ' + e.stack);
|
||||
}
|
||||
res.writeHead(200, headers);
|
||||
res.write('ok');
|
||||
res.end();
|
||||
|
||||
@@ -48,7 +48,9 @@ Polling.prototype._onConnect = function(req, res){
|
||||
// optimization: just strip first 5 characters here?
|
||||
var msg = qs.parse(body);
|
||||
self._onMessage(msg.data);
|
||||
} catch(e){}
|
||||
} catch(e){
|
||||
self.listener.options.log('xhr-polling message handler error - ' + e.stack);
|
||||
}
|
||||
res.writeHead(200, headers);
|
||||
res.write('ok');
|
||||
res.end();
|
||||
@@ -67,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);
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{ "name" : "socket.io"
|
||||
, "description" : "The cross-browser WebSocket"
|
||||
, "version" : "0.6.10"
|
||||
, "version" : "0.6.16"
|
||||
, "author" : "LearnBoost"
|
||||
, "licenses" :
|
||||
[ { "type" : "MIT"
|
||||
|
||||
Reference in New Issue
Block a user