[Rubygems-developers] [PATCH] Authenticated proxy support

Assaph Mehr assaph at gmail.com
Tue Jan 11 18:57:20 EST 2005

Hi all,

> * Proxy login is Basic only and will fail if NTLM authentication is
> required.  NTLM is a royal pain to implement.

Googling for NTLM proxy authentication gave me this:
It's a local proxy running on my machine that can do the NTLM
authentication with the corporate proxy. I have managed to get ruby
(both net/http and open-uri) connect this way to the internet. This
proxy also supports basic authentications

However, using rubygems with this proxy gave a timeout error:

c:\>gem l --debug --backtrace -r -p http://localhost:5865/

Updating Gem source index for: http://gems.rubyforge.org
Exception `Timeout::Error' at c:/bin/ruby/lib/ruby/1.8/timeout.rb:42 -
execution expired
c:/bin/ruby/lib/ruby/1.8/timeout.rb:42:in `rbuf_fill': execution
expired (Timeout::Error)
        from c:/bin/ruby/lib/ruby/1.8/net/protocol.rb:196:in `timeout'
        from c:/bin/ruby/lib/ruby/1.8/timeout.rb:55:in `timeout'
        from c:/bin/ruby/lib/ruby/1.8/net/protocol.rb:196:in `rbuf_fill'
        from c:/bin/ruby/lib/ruby/1.8/net/protocol.rb:160:in `readuntil'
        from c:/bin/ruby/lib/ruby/1.8/net/protocol.rb:171:in `readline'
        from c:/bin/ruby/lib/ruby/1.8/net/http.rb:1554:in `read_status_line'
        from c:/bin/ruby/lib/ruby/1.8/net/http.rb:1538:in `read_new'
        from c:/bin/ruby/lib/ruby/1.8/net/http.rb:833:in `request'
         ... 16 levels...
        from c:/bin/ruby/lib/ruby/site_ruby/1.8/rubygems/cmd_manager.rb:90:in
        from c:/bin/ruby/lib/ruby/site_ruby/1.8/rubygems/cmd_manager.rb:63:in
        from c:/bin/ruby/lib/ruby/site_ruby/1.8/rubygems/gem_runner.rb:9:in
        from c:/bin/ruby/bin/gem:11
removing C:/DOCUME~1/AssaphM/LOCALS~1/Temp/open-uri2952.0...done

While this is not an ideal solution (heck, it's in Python :-), it
might offer a solution to others in the same situation. I will try and
see if I can find what's the problem. Is there a way to get the full
backtrace? (as the problem looks to be in the snipped part :-).


More information about the Rubygems-developers mailing list