diff options
| author | Hiroshi SHIBATA <hsbt@ruby-lang.org> | 2024-07-08 13:39:54 +0900 |
|---|---|---|
| committer | git <svn-admin@ruby-lang.org> | 2024-07-08 04:53:14 +0000 |
| commit | dcc8e54234fb7acbbede52bfc9f74ce1e1deb491 (patch) | |
| tree | 1f86ac9fad2a17c1fe6395f3dc8d275c6cd05275 | |
| parent | bf898057b40d21994cbf86dbd8b3cad412ef8847 (diff) | |
[ruby/open-uri] Don't use Base64 library
https://github.com/ruby/open-uri/commit/c8c0452d53
| -rw-r--r-- | test/open-uri/utils.rb | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/test/open-uri/utils.rb b/test/open-uri/utils.rb index b529ba8fe8..3a79a32ea1 100644 --- a/test/open-uri/utils.rb +++ b/test/open-uri/utils.rb @@ -1,5 +1,4 @@ require 'socket' -require 'base64' class SimpleHTTPServer def initialize(bind_addr, port, log) @@ -79,7 +78,7 @@ class SimpleHTTPServer return unless auth && auth.start_with?('Basic ') encoded_credentials = auth.split(' ', 2).last - decoded_credentials = Base64.decode64(encoded_credentials) + decoded_credentials = [encoded_credentials].pack("m") @username, @password = decoded_credentials.split(':', 2) end end |
