Skip to content

Commit

Permalink
test: added test for parser breakage
Browse files Browse the repository at this point in the history
  • Loading branch information
rauchg committed Mar 3, 2015
1 parent 1b2d902 commit 125ab51
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions test/socket.io.js
Original file line number Diff line number Diff line change
Expand Up @@ -1363,6 +1363,23 @@ describe('socket.io', function(){
});
});
});

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.transport.ws.send('45');
});
});
});
});
});

describe('messaging many', function(){
Expand Down

0 comments on commit 125ab51

Please sign in to comment.