From 2fff0f4f71452e161825f079de9f7c65b088b260 Mon Sep 17 00:00:00 2001 From: nahi Date: Mon, 25 Jul 2011 13:21:49 +0000 Subject: * lib/xmlrpc/client.rb: Fix possible HTTP header formatting failure by 'Basic' header. Long username caused the base64 String truncation in HTTP header which is not allowed. See #5046. * test/xmlrpc/test_webrick_server.rb: test it. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32666 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- lib/xmlrpc/client.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/xmlrpc/client.rb') diff --git a/lib/xmlrpc/client.rb b/lib/xmlrpc/client.rb index 65c9cd0c9c..c09a9514d6 100644 --- a/lib/xmlrpc/client.rb +++ b/lib/xmlrpc/client.rb @@ -493,7 +493,7 @@ module XMLRPC else a = "#@user" a << ":#@password" if @password != nil - @auth = ("Basic " + [a].pack("m")).chomp + @auth = "Basic " + [a].pack("m0") end end -- cgit v1.2.1