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

use CGI.escape when encoding the POST body

URL.encode was not encoding the '+' characters within ssh keys
This commit is contained in:
Sam Cooper 2012-11-06 11:27:46 -08:00
parent 86322ce4bf
commit 999ae4c54e

View file

@ -30,14 +30,12 @@ module Fog
'location' => location_id
}
body = URI.encode options.map {|k,v| "#{k}=#{v}"}.join('&')
request(
:expects => 200,
:method => 'POST',
:path => '/api/blocks.json',
:query => query,
:body => URI.encode(body)
:body => options.map {|k,v| "#{CGI.escape(k)}=#{CGI.escape(v)}"}.join('&')
)
end