diff --git a/lib/webrick/httpproxy.rb b/lib/webrick/httpproxy.rb index 65f830ecbb..c5ed44f1da 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