lib/http/protocol/http2/continuation_frame.rb in http-protocol-0.3.0 vs lib/http/protocol/http2/continuation_frame.rb in http-protocol-0.3.1

- old
+ new

@@ -22,12 +22,18 @@ module HTTP module Protocol module HTTP2 module Continued + def initialize(*) + super + + @continuation = nil + end + def end_headers? - @flags & END_HEADERS + flag_set?(END_HEADERS) end def read(io) super @@ -64,9 +70,17 @@ set_flags(END_HEADERS) super data, **options @continuation = nil + end + end + + def unpack + if @continuation.nil? + super + else + super + @continuation.unpack end end end # The CONTINUATION frame is used to continue a sequence of header block fragments. Any number of CONTINUATION frames can be sent, as long as the preceding frame is on the same stream and is a HEADERS, PUSH_PROMISE, or CONTINUATION frame without the END_HEADERS flag set.