lib/faraday/adapter/net_http.rb in faraday-0.9.2 vs lib/faraday/adapter/net_http.rb in faraday-0.10.0
- old
+ new
@@ -15,10 +15,11 @@
Errno::ECONNREFUSED,
Errno::ECONNRESET,
Errno::EHOSTUNREACH,
Errno::EINVAL,
Errno::ENETUNREACH,
+ Errno::EPIPE,
Net::HTTPBadResponse,
Net::HTTPHeaderSyntaxError,
Net::ProtocolError,
SocketError,
Zlib::GzipFile::Error,
@@ -44,10 +45,10 @@
else
raise Error::ConnectionFailed, err
end
end
- save_response(env, http_response.code.to_i, http_response.body || '') do |response_headers|
+ save_response(env, http_response.code.to_i, http_response.body || '', nil, http_response.message) do |response_headers|
http_response.each_header do |key, value|
response_headers[key] = value
end
end
end