http2: added http2_settings as configurable options

This commit is contained in:
HoneyryderChuck 2018-01-08 22:29:14 +00:00
parent 491bf11e2e
commit 30fcdfeb2c
2 changed files with 2 additions and 1 deletions

View File

@ -109,7 +109,7 @@ module HTTPX
end
def init_connection
@connection = HTTP2::Client.new(settings_enable_push: 0)
@connection = HTTP2::Client.new(@options.http2_settings)
@connection.on(:frame, &method(:on_frame))
@connection.on(:frame_sent, &method(:on_frame_sent))
@connection.on(:frame_received, &method(:on_frame_received))

View File

@ -67,6 +67,7 @@ class OptionsSpec < Minitest::Test
:form => {:bar => "bar"},
:timeout => Timeout::PerOperation.new,
:ssl => {:foo => "bar", :alpn_protocols => %w[h2 http/1.1] },
:http2_settings => { :settings_enable_push => 0 },
:fallback_protocol => "http/1.1",
:headers => {"Foo" => "foo", "Accept" => "xml", "Bar" => "bar"},
:max_concurrent_requests => 100,