mirror of
https://github.com/ruby/ruby.git
synced 2025-09-15 08:33:58 +02:00
* 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: svn+ssh://ci.ruby-lang.org/ruby/trunk@14303 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
192ec21adf
commit
06591ad6b1
7 changed files with 15 additions and 9 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue