63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
|
# File 'lib/fog/storage/aws.rb', line 63
def url(params, expires)
params[:headers] ||= {}
params[:headers]['Date'] = expires.to_i
params[:path] = Fog::AWS.escape(params[:path]).gsub('%2F', '/')
query = []
if params[:query]
for key, value in params[:query]
query << "#{key}=#{Fog::AWS.escape(value)}"
end
end
query << "AWSAccessKeyId=#{@aws_access_key_id}"
query << "Signature=#{Fog::AWS.escape(signature(params))}"
query << "Expires=#{params[:headers]['Date']}"
"https://#{@host}/#{params[:path]}?#{query.join('&')}"
end
|