From a5810fdbe9988088e290dcb5a4495648819f6b7f Mon Sep 17 00:00:00 2001 From: Chris Hasenpflug Date: Fri, 30 Dec 2011 00:57:13 -0600 Subject: [PATCH] Correct an error with long keys where Base64.encode64 would add "\n" at 60 chars. --- lib/fog/dnsimple/dns.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/fog/dnsimple/dns.rb b/lib/fog/dnsimple/dns.rb index e47ea5a2f..6eb00cd2a 100644 --- a/lib/fog/dnsimple/dns.rb +++ b/lib/fog/dnsimple/dns.rb @@ -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.strict_encode64(key).chomp, "Accept" => "application/json", "Content-Type" => "application/json" })