Skip to content

Commit 91c7bde

Browse files
committed
Merge commit '342faf219793fc5c1f130fc33e3fb5422dab516d'
2 parents 874a4a8 + 342faf2 commit 91c7bde

File tree

3 files changed

+41
-8
lines changed

3 files changed

+41
-8
lines changed

History.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,20 @@
11

2+
1.3.5 / 2015-03-03
3+
==================
4+
5+
* package: bump `socket.io-parser`
6+
7+
1.3.4 / 2015-02-14
8+
==================
9+
10+
* package: bump `socket.io-client`
11+
12+
1.3.3 / 2015-02-03
13+
==================
14+
15+
* socket: warn node_redis-style about missing `error`
16+
* package: bump parser to better handle bad binary packets
17+
218
1.3.2 / 2015-01-19
319
==================
420

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "socket.io",
3-
"version": "1.3.2",
3+
"version": "1.3.5",
44
"description": "node.js realtime framework server",
55
"keywords": [
66
"realtime",
@@ -21,7 +21,7 @@
2121
},
2222
"dependencies": {
2323
"engine.io": "automattic/engine.io#ab2bd0",
24-
"socket.io-parser": "2.2.3",
24+
"socket.io-parser": "2.2.4",
2525
"socket.io-client": "automattic/socket.io-client#e89816",
2626
"socket.io-adapter": "automattic/socket.io-adapter#de5cba",
2727
"has-binary": "0.1.6",

test/socket.io.js

Lines changed: 23 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1567,13 +1567,13 @@ describe('socket.io', function(){
15671567
var srv = http();
15681568
var sio = io(srv);
15691569
srv.listen(function(){
1570-
var socket = client(srv);
1571-
sio.on('connection', function(s){
1570+
var socket = client(srv, '/chat');
1571+
sio.of('/chat').on('connection', function(s){
15721572
s.conn.once('packetCreate', function(packet) {
15731573
expect(packet.options.compress).to.be(true);
15741574
done();
15751575
});
1576-
s.emit('woot', 'hi');
1576+
sio.of('/chat').emit('woot', 'hi');
15771577
});
15781578
});
15791579
});
@@ -1582,13 +1582,13 @@ describe('socket.io', function(){
15821582
var srv = http();
15831583
var sio = io(srv);
15841584
srv.listen(function(){
1585-
var socket = client(srv);
1586-
sio.on('connection', function(s){
1585+
var socket = client(srv, '/chat');
1586+
sio.of('/chat').on('connection', function(s){
15871587
s.conn.once('packetCreate', function(packet) {
15881588
expect(packet.options.compress).to.be(false);
15891589
done();
15901590
});
1591-
s.compress(false).emit('woot', 'hi');
1591+
sio.of('/chat').compress(false).emit('woot', 'hi');
15921592
});
15931593
});
15941594
});
@@ -1626,6 +1626,23 @@ describe('socket.io', function(){
16261626
});
16271627
});
16281628
});
1629+
1630+
it('should handle empty binary packet', function(done){
1631+
var srv = http();
1632+
var sio = io(srv);
1633+
srv.listen(function(){
1634+
var socket = client(srv);
1635+
sio.on('connection', function(s){
1636+
s.once('error', function(err){
1637+
expect(err.message).to.match(/Illegal attachments/);
1638+
done();
1639+
});
1640+
s.conn.on('upgrade', function(){
1641+
socket.io.engine.write('5');
1642+
});
1643+
});
1644+
});
1645+
});
16291646
});
16301647

16311648
describe('messaging many', function(){

0 commit comments

Comments
 (0)