lib/faraday/adapter/net_http.rb in faraday-net_http-3.1.0 vs lib/faraday/adapter/net_http.rb in faraday-net_http-3.1.1

- old
+ new

@@ -40,12 +40,11 @@ super(app, opts, &block) end def build_connection(env) net_http_connection(env).tap do |http| - http.use_ssl = env[:url].scheme == 'https' if http.respond_to?(:use_ssl=) - configure_ssl(http, env[:ssl]) + configure_ssl(http, env[:ssl]) if env[:url].scheme == 'https' && env[:ssl] configure_request(http, env[:request]) end end def net_http_connection(env) @@ -127,10 +126,10 @@ end end end def configure_ssl(http, ssl) - return unless ssl + http.use_ssl = true if http.respond_to?(:use_ssl=) http.verify_mode = ssl_verify_mode(ssl) http.cert_store = ssl_cert_store(ssl) http.cert = ssl[:client_cert] if ssl[:client_cert]