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:
parent
86322ce4bf
commit
999ae4c54e
1 changed files with 1 additions and 3 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue