mirror of
https://github.com/socketio/socket.io.git
synced 2026-01-11 16:08:24 -05:00
Compare commits
14 Commits
1.3.2
...
1.3.6-patc
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c79e787671 | ||
|
|
3e4061bfef | ||
|
|
4c1d691fe5 | ||
|
|
342faf2197 | ||
|
|
12c6ee132d | ||
|
|
c9d909c993 | ||
|
|
125ab51338 | ||
|
|
1b2d902f33 | ||
|
|
9536437907 | ||
|
|
29974ac777 | ||
|
|
ef23c74bea | ||
|
|
49423d70bc | ||
|
|
715c7f99b4 | ||
|
|
f2ea965c6b |
21
History.md
21
History.md
@@ -1,4 +1,25 @@
|
||||
|
||||
1.3.6 / 2015-07-14
|
||||
==================
|
||||
|
||||
* package: bump `engine.io` to fix build on windows
|
||||
|
||||
1.3.5 / 2015-03-03
|
||||
==================
|
||||
|
||||
* package: bump `socket.io-parser`
|
||||
|
||||
1.3.4 / 2015-02-14
|
||||
==================
|
||||
|
||||
* package: bump `socket.io-client`
|
||||
|
||||
1.3.3 / 2015-02-03
|
||||
==================
|
||||
|
||||
* socket: warn node_redis-style about missing `error`
|
||||
* package: bump parser to better handle bad binary packets
|
||||
|
||||
1.3.2 / 2015-01-19
|
||||
==================
|
||||
|
||||
|
||||
@@ -390,7 +390,12 @@ Socket.prototype.ondisconnect = function(){
|
||||
*/
|
||||
|
||||
Socket.prototype.onerror = function(err){
|
||||
this.emit('error', err);
|
||||
if (this.listeners('error').length) {
|
||||
this.emit('error', err);
|
||||
} else {
|
||||
console.error('Missing error handler on `socket`.');
|
||||
console.error(err.stack);
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "socket.io",
|
||||
"version": "1.3.2",
|
||||
"version": "1.3.6",
|
||||
"description": "node.js realtime framework server",
|
||||
"keywords": [
|
||||
"realtime",
|
||||
@@ -19,9 +19,9 @@
|
||||
"test": "mocha --reporter dot --slow 200ms --bail"
|
||||
},
|
||||
"dependencies": {
|
||||
"engine.io": "1.5.1",
|
||||
"socket.io-parser": "2.2.2",
|
||||
"socket.io-client": "1.3.2",
|
||||
"engine.io": "1.5.2",
|
||||
"socket.io-parser": "2.2.4",
|
||||
"socket.io-client": "1.3.6",
|
||||
"socket.io-adapter": "0.3.1",
|
||||
"has-binary-data": "0.1.3",
|
||||
"debug": "2.1.0"
|
||||
|
||||
@@ -1279,6 +1279,7 @@ describe('socket.io', function(){
|
||||
});
|
||||
|
||||
it('should handle very large binary data', function(done){
|
||||
this.timeout(30000);
|
||||
var srv = http();
|
||||
var sio = io(srv);
|
||||
var received = 0;
|
||||
@@ -1329,6 +1330,57 @@ describe('socket.io', function(){
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
it('should error with raw binary and warn', function(done){
|
||||
var srv = http();
|
||||
var sio = io(srv);
|
||||
srv.listen(function(){
|
||||
var socket = client(srv);
|
||||
sio.on('connection', function(s){
|
||||
s.conn.on('upgrade', function(){
|
||||
console.log('\033[96mNote: warning expected and normal in test.\033[39m');
|
||||
socket.io.engine.write('5woooot');
|
||||
setTimeout(function(){
|
||||
done();
|
||||
}, 100);
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
it('should not crash with raw binary', function(done){
|
||||
var srv = http();
|
||||
var sio = io(srv);
|
||||
srv.listen(function(){
|
||||
var socket = client(srv);
|
||||
sio.on('connection', function(s){
|
||||
s.once('error', function(err){
|
||||
expect(err.message).to.match(/Illegal attachments/);
|
||||
done();
|
||||
});
|
||||
s.conn.on('upgrade', function(){
|
||||
socket.io.engine.write('5woooot');
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
it('should handle empty binary packet', function(done){
|
||||
var srv = http();
|
||||
var sio = io(srv);
|
||||
srv.listen(function(){
|
||||
var socket = client(srv);
|
||||
sio.on('connection', function(s){
|
||||
s.once('error', function(err){
|
||||
expect(err.message).to.match(/Illegal attachments/);
|
||||
done();
|
||||
});
|
||||
s.conn.on('upgrade', function(){
|
||||
socket.io.engine.write('5');
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
describe('messaging many', function(){
|
||||
|
||||
Reference in New Issue
Block a user