Skip to content

Commit

Permalink
Data and data FIN are now separate packets.
Browse files Browse the repository at this point in the history
To better support server push
  • Loading branch information
eee-c committed Aug 21, 2011
1 parent 0c49222 commit 470e7bb
Showing 1 changed file with 18 additions and 4 deletions.
22 changes: 18 additions & 4 deletions test/spdy-basic-test.js
Expand Up @@ -108,9 +108,6 @@ vows.describe('SPDY/basic test').addBatch({
connection.pipe(parser);

return {parser: parser};
parser.on('cframe', function(cframe) {
callback(null, cframe);
});
},
'and waiting for SYN_REPLY': {
topic: function(context) {
Expand All @@ -134,7 +131,24 @@ vows.describe('SPDY/basic test').addBatch({
var parser = context.parser
, callback = this.callback;
parser.on('dframe', function(dframe) {
callback(null, dframe);
if (dframe.headers.flags == 0) {
callback(null, dframe);
}
});
},
'should end up w/ that frame': function(dframe) {
assert.ok(!dframe.headers.c);
assert.equal(0, dframe.headers.flags & spdy.enums.DATA_FLAG_FIN);
}
},
'and waiting for Data FIN': {
topic: function(context) {
var parser = context.parser
, callback = this.callback;
parser.on('dframe', function(dframe) {
if (dframe.headers.flags != 0) {
callback(null, dframe);
}
});
},
'should end up w/ that frame': function(dframe) {
Expand Down

0 comments on commit 470e7bb

Please sign in to comment.