summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/webrick/httpproxy.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/webrick/httpproxy.rb b/lib/webrick/httpproxy.rb
index 65f830ecbb5..c5ed44f1daf 100644
--- a/lib/webrick/httpproxy.rb
+++ b/lib/webrick/httpproxy.rb
@@ -110,7 +110,7 @@ module WEBrick
proxy_host = proxy.host
proxy_port = proxy.port
if proxy.userinfo
- credentials = "Basic " + encode64(proxy.userinfo)
+ credentials = "Basic " + [proxy.userinfo].pack("m*")
header['proxy-authorization'] = credentials
end
end
@@ -170,7 +170,7 @@ module WEBrick
if proxy = proxy_uri(req, res)
proxy_request_line = "CONNECT #{host}:#{port} HTTP/1.0"
if proxy.userinfo
- credentials = "Basic " + encode64(proxy.userinfo)
+ credentials = "Basic " + [proxy.userinfo].pack("m*")
end
host, port = proxy.host, proxy.port
end