lib/http/2/connection.rb in http-2-0.10.2 vs lib/http/2/connection.rb in http-2-0.11.0

- old
+ new

@@ -74,12 +74,12 @@ # def initialize(**settings) @local_settings = DEFAULT_CONNECTION_SETTINGS.merge(settings) @remote_settings = SPEC_DEFAULT_CONNECTION_SETTINGS.dup - @compressor = Header::Compressor.new(settings) - @decompressor = Header::Decompressor.new(settings) + @compressor = Header::Compressor.new(**settings) + @decompressor = Header::Decompressor.new(**settings) @active_stream_count = 0 @streams = {} @streams_recently_closed = {} @pending_settings = [] @@ -537,11 +537,11 @@ # remote: just received peer settings should immediately be effective settings, side = if frame[:flags].include?(:ack) # Process pending settings we have sent. [@pending_settings.shift, :local] else - connection_error(check) if validate_settings(@remote_role, frame[:payload]) + connection_error if validate_settings(@remote_role, frame[:payload]) [frame[:payload], :remote] end settings.each do |key, v| case side @@ -591,11 +591,12 @@ when :settings_enable_push # nothing to do when :settings_max_frame_size - # nothing to do + # update framer max_frame_size + @framer.max_frame_size = v # else # ignore unknown settings end end @@ -672,10 +673,10 @@ # @param window [Integer] # @param parent [Stream] def activate_stream(id: nil, **args) connection_error(msg: 'Stream ID already exists') if @streams.key?(id) - stream = Stream.new({ connection: self, id: id }.merge(args)) + stream = Stream.new(**{ connection: self, id: id }.merge(args)) # Streams that are in the "open" state, or either of the "half closed" # states count toward the maximum number of streams that an endpoint is # permitted to open. stream.once(:active) { @active_stream_count += 1 }