Skip to content

Commit

Permalink
[storage|aws] fix url to check for query
Browse files Browse the repository at this point in the history
  • Loading branch information
geemus committed Jun 8, 2011
1 parent 99eb024 commit 73b30b1
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lib/fog/storage/aws.rb
Expand Up @@ -66,8 +66,10 @@ def url(params, expires)
params[:headers]['Date'] = expires.to_i
params[:path] = Fog::AWS.escape(params[:path]).gsub('%2F', '/')
query = []
for key, value in params[:query]
query << "#{key}=#{Fog::AWS.escape(value)}"
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))}"
Expand Down

0 comments on commit 73b30b1

Please sign in to comment.