summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authornahi <nahi@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-07-25 13:25:27 +0000
committernahi <nahi@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-07-25 13:25:27 +0000
commit798355f6e33b854a00252f680f00ebb94b7b1355 (patch)
treee8b5e71f379b33f93b9da620c355072ed71cceda /lib
parente68c8979255e4f562b16994e04520f06312c5f96 (diff)
* backport r32666 from trunk.
* 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/branches/ruby_1_9_3@32668 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib')
-rw-r--r--lib/xmlrpc/client.rb2
1 files changed, 1 insertions, 1 deletions
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