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

Merge pull request #183 from wangteji/disable-get-object-idempotent-streaming

Disable idempotent option when block is passed to get_object
This commit is contained in:
Wesley Beary 2015-09-16 10:19:48 -05:00
commit 7a02ca2318

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