Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion lib/net_fix.rb
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,14 @@ def exec(sock, ver, path, send_only=nil) #:nodoc: internal use only
if @body
send_request_with_body sock, ver, path, @body, send_only
elsif @body_stream
send_request_with_body_stream sock, ver, path, @body_stream, send_only
begin
send_request_with_body_stream sock, ver, path, @body_stream, send_only
rescue ArgumentError
# this rescue is called when users have both net_http_connection and aws-s3 gem installed.
# For whatever reason, sometimes this method gets redefined by aws-s3 (depending on load order)
# the aws-s3 gem only has 4 options, not 5, so users see an ArgumentError (5 for 4) when this gets called.
send_request_with_body_stream sock, ver, path, @body_stream
end
else
write_header(sock, ver, path)
end
Expand Down