lib/protocol/http2/settings_frame.rb in protocol-http2-0.1.1 vs lib/protocol/http2/settings_frame.rb in protocol-http2-0.2.0
- old
+ new
@@ -56,10 +56,11 @@
def initial_window_size= value
if value <= MAXIMUM_ALLOWED_WINDOW_SIZE
@initial_window_size = value
else
+ # An endpoint MUST treat a change to SETTINGS_INITIAL_WINDOW_SIZE that causes any flow-control window to exceed the maximum size as a connection error of type FLOW_CONTROL_ERROR.
raise FlowControlError, "Invalid value for initial_window_size: #{value} > #{MAXIMUM_ALLOWED_WINDOW_SIZE}"
end
end
# Indicates the size of the largest frame payload that the sender is willing to receive, in octets.
@@ -156,10 +157,10 @@
if changes = @queue.shift
@current.update(changes)
return changes
else
- raise ProtocolError.new("Cannot acknowledge settings, no changes pending")
+ raise ProtocolError, "Cannot acknowledge settings, no changes pending"
end
end
def header_table_size
@current.header_table_size