Skip to content
Browse files

Data and data FIN are now separate packets.

To better support server push
  • Loading branch information...
1 parent 0c49222 commit 470e7bbe97ebcb6e3d0bdc7eb13ac345c679584b @eee-c eee-c committed Aug 21, 2011
Showing with 18 additions and 4 deletions.
  1. +18 −4 test/spdy-basic-test.js
View
22 test/spdy-basic-test.js
@@ -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) {
@@ -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) {

0 comments on commit 470e7bb

Please sign in to comment.
Something went wrong with that request. Please try again.