Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

SynStream doesn't set an associated_to_stream_id.

  • Loading branch information...
commit d823c4a05c676d8e5e9bf13e82ef7deb4bc46c8f 1 parent e9857e9
@authorNari authorNari authored
Showing with 5 additions and 1 deletion.
  1. +3 −0  lib/spdy/protocol.rb
  2. +2 −1  spec/protocol_spec.rb
View
3  lib/spdy/protocol.rb
@@ -83,6 +83,9 @@ class SynStream < BinData::Record
def create(opts = {})
build({:type => 1, :len => 10}.merge(opts))
+ if opts[:associated_to_stream_id]
+ self.associated_to_stream_id = opts[:associated_to_stream_id]
+ end
end
end
View
3  spec/protocol_spec.rb
@@ -46,9 +46,10 @@
"url"=>"/?echo=a&format=json","version"=>"HTTP/1.1"
}
- sr.create({:stream_id => 1, :headers => headers})
+ sr.create({:stream_id => 1, :headers => headers, :associated_to_stream_id => 2})
sr.header.version.should == 2
sr.pri.should == 0
+ sr.associated_to_stream_id.should == 2
sr.header.len.should > 50
sr.data.should_not be_nil
Please sign in to comment.
Something went wrong with that request. Please try again.