summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authoraamine <aamine@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-12-15 18:14:54 +0000
committeraamine <aamine@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-12-15 18:14:54 +0000
commitddbc6fb28e1d48efa7b1fb47364b00af751a0cc6 (patch)
treed4b1c37fc8b70a769120876a28eefb4cd8b01b78 /lib
parente1375ab5e61df3a8a706a5165448a72d80a57414 (diff)
downloadruby-ddbc6fb28e1d48efa7b1fb47364b00af751a0cc6.tar.gz
ruby-ddbc6fb28e1d48efa7b1fb47364b00af751a0cc6.tar.xz
ruby-ddbc6fb28e1d48efa7b1fb47364b00af751a0cc6.zip
* 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
Diffstat (limited to 'lib')
-rw-r--r--lib/net/http.rb2
1 files changed, 1 insertions, 1 deletions
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