[Rubygems-developers] Patch that fixes Proxy authorization problem (407)

Mauricio Fernandez mfp at acm.org
Thu Dec 15 20:59:49 EST 2005


On Thu, Dec 15, 2005 at 08:24:48PM -0500, Austin Ziegler wrote:
> On 15/12/05, Mauricio Fernandez <mfp at acm.org> wrote:
> > On Thu, Dec 15, 2005 at 05:41:37PM -0500, Austin Ziegler wrote:
> > > > > > So I suggest redo a little my patch and use following algorithm
> > > > > >   http_proxy = options() || ENV['HTTP_PROXY']
> > > > > >   if http_proxy contains login and lassword
> > > > > >     proxy_user = extract login from http_proxy
> > > > > >      proxy_password = extract password from http_proxy
> > > > > >   else
> > > > > >     proxy_user = HTTP['http_proxy_user']
> > > > > >     proxy_password = ENV['http_proxy_pass']
> > > > > >   end
> > > > > I'm going to request a unit or functional test for this logic.  Thanks.
> > > Might I suggest that this won't work on Windows?
> > He's not discriminating based on capitalization, is he?
> > If that's not a problem, why won't the above work on win32?
> 
> It seems that he is, or that there is an error (or two) in his pseudo-code.

hmmm

He tries to extract the auth info from HTTP_PROXY, and falls back to
http_proxy_{user,pass} (it should be HTTP_PROXY_{USER,PASS} though, is
that the 'error' you referred to?). Shouldn't that work?

[some additional checks could help; does it make sense for instance to define
HTTP_PROXY_PASS but not HTTP_PROXY_USER?]
-- 
Mauricio Fernandez


More information about the Rubygems-developers mailing list