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:
parent
5518f791f5
commit
566ea6926d
1 changed files with 3 additions and 1 deletions
|
@ -48,15 +48,17 @@ module Fog
|
||||||
params[:headers]['If-Unmodified-Since'] = Fog::Time.at(options['If-Unmodified-Since'].to_i).to_date_header
|
params[:headers]['If-Unmodified-Since'] = Fog::Time.at(options['If-Unmodified-Since'].to_i).to_date_header
|
||||||
end
|
end
|
||||||
|
|
||||||
|
idempotent = true
|
||||||
if block_given?
|
if block_given?
|
||||||
params[:response_block] = Proc.new
|
params[:response_block] = Proc.new
|
||||||
|
idempotent = false
|
||||||
end
|
end
|
||||||
|
|
||||||
request(params.merge!({
|
request(params.merge!({
|
||||||
:expects => [ 200, 206 ],
|
:expects => [ 200, 206 ],
|
||||||
:bucket_name => bucket_name,
|
:bucket_name => bucket_name,
|
||||||
:object_name => object_name,
|
:object_name => object_name,
|
||||||
:idempotent => true,
|
:idempotent => idempotent,
|
||||||
:method => 'GET',
|
:method => 'GET',
|
||||||
}))
|
}))
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue