1
0
Fork 0
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:
geemus 2011-07-05 17:57:08 -05:00
parent b93a049a05
commit f788b0ea94

View file

@ -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,