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

Merge pull request #682 from chrishas35/patch-1

Correct an error with long keys where Base64.encode64 adds "\n" at 60 chars
This commit is contained in:
Wesley Beary 2012-02-08 07:45:42 -08:00
commit 03b5adacfa

View file

@ -80,7 +80,7 @@ module Fog
def request(params)
params[:headers] ||= {}
key = "#{@dnsimple_email}:#{@dnsimple_password}"
params[:headers].merge!({ "Authorization" => "Basic " + Base64.encode64(key).chomp,
params[:headers].merge!({ "Authorization" => "Basic " + Base64.encode64(key).gsub("\n",''),
"Accept" => "application/json",
"Content-Type" => "application/json" })