summaryrefslogtreecommitdiffstats
path: root/lib/webrick
diff options
context:
space:
mode:
authorgotoyuzo <gotoyuzo@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-12-18 13:37:10 +0000
committergotoyuzo <gotoyuzo@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-12-18 13:37:10 +0000
commit92f480254b9c33907f92c74ad195327cfda2ed6f (patch)
tree14c9a6deb0d454b3123a56a12f830344ed9b65dd /lib/webrick
parente2e29af2b6054dee368de55ba522c58f9038574e (diff)
downloadruby-92f480254b9c33907f92c74ad195327cfda2ed6f.tar.gz
ruby-92f480254b9c33907f92c74ad195327cfda2ed6f.tar.xz
ruby-92f480254b9c33907f92c74ad195327cfda2ed6f.zip
* lib/rss/parser.rb, lib/rss/atom.rb, lib/rss/rss.rb,
test/rss/rss-assertions.rb, test/rss/test_atom.rb: use pack/unpack("m") instead of base64 library. * lib/webrick/httpproxy.rb: use delete("\n") instead of chomp/chop because the result of pack("m") might be multi-line. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@14303 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/webrick')
-rw-r--r--lib/webrick/httpproxy.rb6
1 files changed, 2 insertions, 4 deletions
diff --git a/lib/webrick/httpproxy.rb b/lib/webrick/httpproxy.rb
index 8864620e1..32603e763 100644
--- a/lib/webrick/httpproxy.rb
+++ b/lib/webrick/httpproxy.rb
@@ -118,8 +118,7 @@ module WEBrick
proxy_host = proxy.host
proxy_port = proxy.port
if proxy.userinfo
- credentials = "Basic " + [proxy.userinfo].pack("m*")
- credentials.chomp!
+ credentials = "Basic " + [proxy.userinfo].pack("m").delete("\n")
header['proxy-authorization'] = credentials
end
end
@@ -179,8 +178,7 @@ module WEBrick
if proxy = proxy_uri(req, res)
proxy_request_line = "CONNECT #{host}:#{port} HTTP/1.0"
if proxy.userinfo
- credentials = "Basic " + [proxy.userinfo].pack("m*")
- credentials.chomp!
+ credentials = "Basic " + [proxy.userinfo].pack("m").delete("\n")
end
host, port = proxy.host, proxy.port
end