From ddbc6fb28e1d48efa7b1fb47364b00af751a0cc6 Mon Sep 17 00:00:00 2001 From: aamine Date: Wed, 15 Dec 2004 18:14:54 +0000 Subject: * lib/net/http.rb (basic_encode): return value of pack('m') may include multiple CR/LFs. Backported from main trunk (rev 1.112). [ruby-dev:25212] git-svn-id: http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_8@7570 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 6 ++++++ lib/net/http.rb | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 75a93f8e3..ef5654ae2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +Thu Dec 16 03:14:28 2004 Minero Aoki + + * lib/net/http.rb (basic_encode): return value of pack('m') may + include multiple CR/LFs. Backported from main trunk (rev 1.112). + [ruby-dev:25212] + Wed Dec 15 18:48:42 2004 Shugo Maeda * ext/curses/curses.c (window_subwin): call NUM2INT() before diff --git a/lib/net/http.rb b/lib/net/http.rb index 39c58dd52..8ae288984 100644 --- a/lib/net/http.rb +++ b/lib/net/http.rb @@ -1076,7 +1076,7 @@ module Net # :nodoc: end def basic_encode(account, password) - 'Basic ' + ["#{account}:#{password}"].pack('m').strip + 'Basic ' + ["#{account}:#{password}"].pack('m').delete("\r\n") end private :basic_encode -- cgit