mirror of
https://github.com/fog/fog.git
synced 2022-11-09 13:51:43 -05:00
[storage|aws] properly format modified headers in get_object
closes #391
This commit is contained in:
parent
b93a049a05
commit
f788b0ea94
1 changed files with 6 additions and 2 deletions
|
@ -39,9 +39,13 @@ module Fog
|
|||
query = {'versionId' => version_id}
|
||||
end
|
||||
headers = {}
|
||||
headers['If-Modified-Since'] = Fog::Time.at(options['If-Modified-Since'].to_i).to_date_header if options['If-Modified-Since']
|
||||
headers['If-Unmodified-Since'] = Fog::Time.at(options['If-Unmodified-Since'].to_i).to_date_header if options['If-Modified-Since']
|
||||
headers.merge!(options)
|
||||
if headers['If-Modified-Since']
|
||||
headers['If-Modified-Since'] = Fog::Time.at(headers['If-Modified-Since'].to_i).to_date_header
|
||||
end
|
||||
if headers['If-Unmodified-Since']
|
||||
headers['If-Unmodified-Since'] = Fog::Time.at(headers['If-Unmodified-Since'].to_i).to_date_header
|
||||
end
|
||||
request({
|
||||
:expects => [ 200, 206 ],
|
||||
:headers => headers,
|
||||
|
|
Loading…
Add table
Reference in a new issue