lib/travis/client/session.rb in travis-1.8.1.travis.689.5 vs lib/travis/client/session.rb in travis-1.8.1.travis.692.5

- old
+ new

@@ -199,14 +199,15 @@ def delete_raw(*args) raw(:delete, *args) end def raw(verb, url, *args) - url = url.sub(/^\//, '') - result = instrumented(verb.to_s.upcase, url, *args) do - connection.public_send(verb, url, *args) do |request| - next if request.path !~ /^https?:/ or request.path.start_with? api_endpoint - request.headers.delete("Authorization") + url = url.sub(/^\//, '') + result = instrumented(verb.to_s.upcase, url, *args) do + if url !~ /^https?:/ or url.start_with? api_endpoint + connection.public_send(verb, url, *args) + else + Faraday.public_send(verb, url, *args) { |r| r.headers.delete("Authorization") } end end case result.status when 0 then raise Travis::Client::SSLError, 'SSL error: could not verify peer'