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:
parent
ecf0cc0390
commit
99eb02443a
1 changed files with 2 additions and 1 deletions
|
@ -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']}
|
||||
|
|
Loading…
Add table
Reference in a new issue