lib/protocol/http2/window_update_frame.rb in protocol-http2-0.7.0 vs lib/protocol/http2/window_update_frame.rb in protocol-http2-0.7.1

- old
+ new

@@ -95,10 +95,18 @@ def pack(window_size_increment) super [window_size_increment].pack(FORMAT) end def unpack - super.unpack(FORMAT).first + super.unpack1(FORMAT) + end + + def read_payload(stream) + super + + if @length != 4 + raise FrameSizeError, "Invalid frame length: #{@length} != 4!" + end end def apply(connection) connection.receive_window_update(self) end