From: "NARUSE, Yui" Date: 2010-11-27T15:51:47+09:00 Subject: [ruby-core:33418] Re: [Ruby 1.9-Feature#4071] support basic auth for Net::HTTP.get requests (2010/11/26 19:38), coderrr . wrote: > Yui, > > I should point out that the RFC actually does provide an "out" for > allowing a password in the userinfo in section 7.5: "A password > appearing within the userinfo component is deprecated and should be > considered an error (or simply ignored) except in those rare cases > where the 'password' parameter is intended to be public." Since Ruby > of course can't know when a password is intended to be public you > could make an argument that we should support that format and leave > the decision to ignore it or not up to the developer. Yes, Ruby can't know whether the password is intended to be public or not. Moreover Ruby doesn't know whether the userinfo includes a password or not. (of course, we may know by userinfo.split(":")) Another reason why uri lib still supports userinfo is other URI implementations like .NET Framework and Java also support it. http://msdn.microsoft.com/ja-jp/library/system.uri_members(VS.80).aspx http://download.oracle.com/javase/7/docs/api/java/net/URI.html -- NARUSE, Yui