mirror of
https://github.com/lostisland/faraday.git
synced 2025-12-04 00:03:34 -05:00
Merge branch 'em-http-proxy-failure'
This commit is contained in:
commit
033e7b420d
@ -70,6 +70,12 @@ module Faraday
|
|||||||
else
|
else
|
||||||
raise Error::ConnectionFailed, err
|
raise Error::ConnectionFailed, err
|
||||||
end
|
end
|
||||||
|
rescue RuntimeError => err
|
||||||
|
if err.message == "connection closed by server"
|
||||||
|
raise Error::ConnectionFailed, err
|
||||||
|
else
|
||||||
|
raise
|
||||||
|
end
|
||||||
rescue => err
|
rescue => err
|
||||||
if defined?(OpenSSL) && OpenSSL::SSL::SSLError === err
|
if defined?(OpenSSL) && OpenSSL::SSL::SSLError === err
|
||||||
raise Faraday::SSLError, err
|
raise Faraday::SSLError, err
|
||||||
|
|||||||
@ -132,6 +132,7 @@ if [ -n "$(filter_matching "adapters" "${test_files[@]}")" ]; then
|
|||||||
cleanup() {
|
cleanup() {
|
||||||
if [ $? -ne 0 ] && [ -n "$TRAVIS" ]; then
|
if [ $? -ne 0 ] && [ -n "$TRAVIS" ]; then
|
||||||
cat log/test.log
|
cat log/test.log
|
||||||
|
cat log/proxy.log
|
||||||
fi
|
fi
|
||||||
kill "$server_pid"
|
kill "$server_pid"
|
||||||
kill "$proxy_pid"
|
kill "$proxy_pid"
|
||||||
|
|||||||
@ -207,8 +207,10 @@ module Adapters
|
|||||||
conn.get '/echo'
|
conn.get '/echo'
|
||||||
end
|
end
|
||||||
|
|
||||||
unless self.class.ssl_mode? && self.class.jruby?
|
unless self.class.ssl_mode? && (self.class.jruby? ||
|
||||||
|
adapter == :em_http || adapter == :em_synchrony)
|
||||||
# JRuby raises "End of file reached" which cannot be distinguished from a 407
|
# JRuby raises "End of file reached" which cannot be distinguished from a 407
|
||||||
|
# EM raises "connection closed by server" due to https://github.com/igrigorik/em-socksify/pull/19
|
||||||
assert_equal %{407 "Proxy Authentication Required "}, err.message
|
assert_equal %{407 "Proxy Authentication Required "}, err.message
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user