igrigorik / em-http-request

Asynchronous HTTP Client (EventMachine + Ruby)
1.22k stars 220 forks source link

don't warn about TLS host verification when verify_peer is explicitly false #341

Closed aharbick closed 4 years ago

aharbick commented 4 years ago

Let me know if you think the tests are overkill.

aharbick commented 4 years ago

FWIW this spec was already failing

  1) EventMachine::HttpRequest should detect deflate encoding
     Failure/Error: http.response_header["CONTENT_ENCODING"].should == "deflate"

       expected: "deflate"
            got: nil (using ==)
     # ./spec/external_spec.rb:92:in `block (5 levels) in <top (required)>'
     # /Users/aharbick/.rvm/gems/ruby-2.5.7@em-http/gems/eventmachine-1.2.7/lib/em/deferrable.rb:151:in `set_deferred_status'
     # /Users/aharbick/.rvm/gems/ruby-2.5.7@em-http/gems/eventmachine-1.2.7/lib/em/deferrable.rb:191:in `succeed'
     # ./lib/em-http/client.rb:113:in `unbind'
     # ./lib/em-http/client.rb:71:in `on_request_complete'
     # ./lib/em-http/http_connection.rb:204:in `block in post_init'
     # ./lib/em-http/http_connection.rb:219:in `<<'
     # ./lib/em-http/http_connection.rb:219:in `receive_data'
     # ./lib/em-http/http_connection.rb:26:in `receive_data'
     # /Users/aharbick/.rvm/gems/ruby-2.5.7@em-http/gems/eventmachine-1.2.7/lib/eventmachine.rb:195:in `run_machine'
     # /Users/aharbick/.rvm/gems/ruby-2.5.7@em-http/gems/eventmachine-1.2.7/lib/eventmachine.rb:195:in `run'
     # ./spec/external_spec.rb:84:in `block (3 levels) in <top (required)>'