Patches item #8309, was opened at 2007-01-30 15:25
You can respond by visiting: 
http://rubyforge.org/tracker/?func=detail&atid=1700&aid=8309&group_id=426

Category: Ruby1.8
Group: None
Status: Open
Resolution: None
Priority: 3
Submitted By: Paul Sponagl (pauls)
Assigned to: Nobody (None)
Summary: add usage of uri.userinfo to open-uri.rb

Initial Comment:
open-uri('http://user:pass / www.host.de/') does not work as expected.


Index: lib/open-uri.rb
===================================================================
--- lib/open-uri.rb     (revision 11598)
+++ lib/open-uri.rb     (working copy)
@@ -121,6 +121,9 @@
     options = rest.shift if !rest.empty? && Hash === rest.first
     raise ArgumentError.new("extra arguments") if !rest.empty?
     options ||= {}
+    if uri.user and uri.password and not options[:http_basic_authentication]
+      options[:http_basic_authentication] = [uri.user,uri.password] 
+    end
     OpenURI.check_options(options)
 
     unless mode == nil ||

adds this...


----------------------------------------------------------------------

You can respond by visiting: 
http://rubyforge.org/tracker/?func=detail&atid=1700&aid=8309&group_id=426