module Protocol::HTTP2::Continued

def read(stream, maximum_frame_size)

def read(stream, maximum_frame_size)
	super
	
	unless end_headers?
		continuation = ContinuationFrame.new
		continuation.read_header(stream)
		
		# We validate the frame type here:
		unless continuation.valid_type?
			raise ProtocolError, "Invalid frame type: #{@type}!"
		end
		
		if continuation.stream_id != @stream_id
			raise ProtocolError, "Invalid stream id: #{continuation.stream_id} for continuation of stream id: #{@stream_id}!"
		end
		
		continuation.read(stream, maximum_frame_size)
		
		@continuation = continuation
	end
end