lib/faraday/adapter/net_http.rb in faraday-net_http-1.0.1 vs lib/faraday/adapter/net_http.rb in faraday-net_http-1.0.2

- old
+ new

@@ -39,12 +39,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) @@ -153,10 +152,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]