pkgsrc/lang/ruby18-base/patches/patch-as
taca 98d835e4c9 Importing ruby18-base package.
This is minimum ruby 1.8.2 based on current ruby18 and ruby18 package
will be meta pacakge later.
2005-03-06 16:36:56 +00:00

24 lines
910 B
Text

$NetBSD: patch-as,v 1.1.1.1 2005/03/06 16:36:57 taca Exp $
--- lib/webrick/httpproxy.rb.orig 2004-08-22 01:16:18.000000000 +0900
+++ lib/webrick/httpproxy.rb
@@ -110,7 +110,8 @@ module WEBrick
proxy_host = proxy.host
proxy_port = proxy.port
if proxy.userinfo
- credentials = "Basic " + encode64(proxy.userinfo)
+ credentials = "Basic " + [proxy.userinfo].pack("m*")
+ credentials.chomp!
header['proxy-authorization'] = credentials
end
end
@@ -170,7 +171,8 @@ 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*")
+ credentials.chomp!
end
host, port = proxy.host, proxy.port
end