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

[storage|aws] make url a bit more robust

This commit is contained in:
geemus 2011-06-07 15:28:57 -07:00
parent ecf0cc0390
commit 99eb02443a

View file

@ -62,6 +62,7 @@ module Fog
end
def url(params, expires)
params[:headers] ||= {}
params[:headers]['Date'] = expires.to_i
params[:path] = Fog::AWS.escape(params[:path]).gsub('%2F', '/')
query = []
@ -274,7 +275,7 @@ module Fog
def signature(params)
string_to_sign =
<<-DATA
#{params[:method]}
#{params[:method].to_s.upcase}
#{params[:headers]['Content-MD5']}
#{params[:headers]['Content-Type']}
#{params[:headers]['Date']}