mirror of
https://github.com/socketio/socket.io.git
synced 2026-04-30 03:00:39 -04:00
Make sure to POST the ACK after the response close, so that we can test buffering
of ACKs.
This commit is contained in:
@@ -1174,29 +1174,37 @@ module.exports = {
|
||||
});
|
||||
|
||||
cl.handshake(function (sid) {
|
||||
cl.get('/socket.io/{protocol}/xhr-polling/' + sid, function (res, msgs) {
|
||||
cl.get('/socket.io/{protocol}/xhr-polling/' + sid, function (res, data) {
|
||||
res.statusCode.should.eql(200);
|
||||
data.should.eql('');
|
||||
|
||||
msgs.should.have.length(1);
|
||||
msgs[0].should.eql({
|
||||
type: 'ack'
|
||||
, ackId: 1
|
||||
});
|
||||
cl.post(
|
||||
'/socket.io/{protocol}/xhr-polling/' + sid
|
||||
, parser.encodePacket({
|
||||
type: 'message'
|
||||
, data: 'woot'
|
||||
, id: 1
|
||||
, endpoint: ''
|
||||
})
|
||||
, function (res, data) {
|
||||
res.statusCode.should.eql(200);
|
||||
data.should.eql('');
|
||||
|
||||
cl.get(
|
||||
'/socket.io/{protocol}/xhr-polling/' + sid
|
||||
, function (res, msgs) {
|
||||
res.statusCode.should.eql(200);
|
||||
msgs.should.have.length(1);
|
||||
msgs[0].should.eql({
|
||||
type: 'ack'
|
||||
, ackId: 1
|
||||
});
|
||||
}
|
||||
);
|
||||
}
|
||||
);
|
||||
});
|
||||
|
||||
cl.post(
|
||||
'/socket.io/{protocol}/xhr-polling/' + sid
|
||||
, parser.encodePacket({
|
||||
type: 'message'
|
||||
, data: 'woot'
|
||||
, id: 1
|
||||
, endpoint: ''
|
||||
})
|
||||
, function (res, data) {
|
||||
res.statusCode.should.eql(200);
|
||||
data.should.eql('');
|
||||
}
|
||||
);
|
||||
});
|
||||
},
|
||||
|
||||
|
||||
Reference in New Issue
Block a user