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

[aws|storage] Make Files#get consistent with Directory#files

- etag: drop quotes
- content-length: parse to Numeric
- last-modified: parse to Time
This commit is contained in:
Peter Weldon 2011-01-18 19:00:00 +00:00 committed by Peter Weldon
parent eff1990db0
commit e6a4085342

View file

@ -46,6 +46,9 @@ module Fog
:body => data.body, :body => data.body,
:key => key :key => key
}) })
file_data['Last-Modified'] = Time.parse(file_data['Last-Modified'])
file_data['ETag'].gsub!('"','')
file_data['Content-Length'] = file_data['Content-Length'].to_i
new(file_data) new(file_data)
rescue Excon::Errors::NotFound rescue Excon::Errors::NotFound
nil nil