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:
commit
7a02ca2318
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
|
||||
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
|
||||
|
|
Loading…
Reference in a new issue