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

[aws] use AWS.escape instead of CGI.escape

This commit is contained in:
geemus 2011-06-07 15:28:38 -07:00
parent 8fb8642d83
commit ecf0cc0390
2 changed files with 2 additions and 2 deletions

View file

@ -63,7 +63,7 @@ module Fog
end
string_to_sign = "POST\n#{options[:host]}:#{options[:port]}\n#{options[:path]}\n" << body.chop
signed_string = options[:hmac].sign(string_to_sign)
body << "Signature=#{CGI.escape(Base64.encode64(signed_string).chomp!).gsub(/\+/, '%20')}"
body << "Signature=#{escape(Base64.encode64(signed_string).chomp!)}"
body
end

View file

@ -69,7 +69,7 @@ module Fog
query << "#{key}=#{Fog::AWS.escape(value)}"
end
query << "AWSAccessKeyId=#{@aws_access_key_id}"
query << "Signature=#{CGI.escape(signature(params))}"
query << "Signature=#{Fog::AWS.escape(signature(params))}"
query << "Expires=#{params[:headers]['Date']}"
"https://#{@host}/#{params[:path]}?#{query.join('&')}"
end