1
0
Fork 0
mirror of https://github.com/fog/fog-aws.git synced 2022-11-09 13:50:52 -05:00

disable idempotent option when block is passed to get_object

This commit is contained in:
Anthony Mangano 2015-09-15 21:12:50 -04:00
parent 5518f791f5
commit 566ea6926d

View file

@ -48,15 +48,17 @@ module Fog
params[:headers]['If-Unmodified-Since'] = Fog::Time.at(options['If-Unmodified-Since'].to_i).to_date_header
end
idempotent = true
if block_given?
params[:response_block] = Proc.new
idempotent = false
end
request(params.merge!({
:expects => [ 200, 206 ],
:bucket_name => bucket_name,
:object_name => object_name,
:idempotent => true,
:idempotent => idempotent,
:method => 'GET',
}))
end