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

Issue #283: S3 get_object request doesn't really support the Range header

Now if a Range header exists we also expect HTTP status 206.
This commit is contained in:
Tal Yalon 2011-05-02 23:11:47 +03:00
parent 8a048c6c3f
commit d88547799c

View file

@ -43,7 +43,7 @@ module Fog
headers['If-Unmodified-Since'] = Fog::Time.at(options['If-Unmodified-Since'].to_i).to_date_header if options['If-Modified-Since']
headers.merge!(options)
request({
:expects => 200,
:expects => headers.include?('Range') ? [ 200, 206 ] : 200,
:headers => headers,
:host => "#{bucket_name}.#{@host}",
:idempotent => true,