Open blkperl opened 7 years ago
It appears that net-http2 can trigger a TypeError for some servers.
Socket Error as server is not running HTTP2
TypeError
[1] pry(main)> require 'net-http2' => true [2] pry(main)> client = NetHttp2::Client.new("https://cloud.acquia.com") => #<NetHttp2::Client:0x007fcaa5a87420 @connect_timeout=60, @first_data_sent=false, @h2=nil, @is_ssl=true, @mutex=#<Thread::Mutex:0x007fcaa5a87100>, @socket=nil, @socket_thread=nil, @ssl_context= #<OpenSSL::SSL::SSLContext:0x007fcaa5a87218 @npn_protocols=["h2"], @npn_select_cb=#<Proc:0x007fcaa5a87150@/Users/REDACTED/.rvm/gems/ruby-2.4.0/gems/net-http2-0.15.0/lib/net-http2/client.rb:174 (lambda)>>, @streams={}, @uri=#<URI::HTTPS https://cloud.acquia.com>> [3] pry(main)> response = client.call(:get, '/') TypeError: no implicit conversion of nil into String from /Users/REDACTED/.rvm/gems/ruby-2.4.0/gems/net-http2-0.15.0/lib/net-http2/socket.rb:23:in `connect'
You can trigger the same bug with https://console.aws.amazon.com
It appears that net-http2 can trigger a TypeError for some servers.
Expected Behavior
Socket Error as server is not running HTTP2
Actual Behavior
TypeError
Steps to reproduce
You can trigger the same bug with https://console.aws.amazon.com