diff --git a/lib/httpx/channel/http2.rb b/lib/httpx/channel/http2.rb index 391bba76..c36b62cd 100644 --- a/lib/httpx/channel/http2.rb +++ b/lib/httpx/channel/http2.rb @@ -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)) diff --git a/test/options_test.rb b/test/options_test.rb index fa2342f5..9bb71b20 100644 --- a/test/options_test.rb +++ b/test/options_test.rb @@ -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,