From: Chad Fowler Date: 2004-05-05T23:51:01+09:00 Subject: Re: RubyGem behind an authenticating proxy On Wed, 5 May 2004 19:45:16 +0900, Dick Davies wrote: > > * Mehr, Assaph (Assaph) [0526 00:26]: > > > I can't offer any real help; I can only say that RubyGems' proxy > > > handling is completely outsourced to 'open-uri'. If you can > > > demonstrate a simple app using just that, in which your particular > > > proxy works, it would help. > > > > Why aren't you using 'net/http'? > > Probably because it doesn't support ftp :) > AFAIK, open-uri is a wrapper round net/http anyway? > True and true. Also, George Marrows did the open-uri stuff, and one of the best things about it is it *greatly* simplied our HTTP code. > It just means you can replace the below with a simple > open(url) generally. It picks up your proxy from the environment > too, which is nice. Pity about the authentication, but that sounds > like a simple bug/missing feature. > Unfortunately a quick glance through open-uri.rb didn't yield an obvious way to do proxy authentication. It looks like open-uri.rb doesn't use Net::HTTP::Proxy but rather just Net::HTTP. I think it would definitely be worth looking into adding proxy authentication support to open-uri.rb as opposed to hacking RubyGems to work around it. Unfortunately, I don't have a proxy that requires authentication, so for me to do it would require that I setup Squid, etc. Might take a while. Assuming open-uri doesn't support proxy authentication, would this be something you (Adriano) would be interested in taking a shot at? Thanks, Chad