From: Anatol Pomozov Date: 2005-12-12T03:49:56+09:00 Subject: About open-uri and ENV["HTTP_PROXY"] ------=_Part_7485_31986570.1134326990411 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Hi, all. I am investigating problem with Gems and proxy authorization and I have question about open-uri code. To be precise code from OpenURI.open_loop(uri, options) (Current version from CVS) when :proxy opt_proxy =3D options.fetch(:proxy) proxy_user =3D nil proxy_pass =3D nil proxy option mostly come from ENV and could contain information for basic authorization: username and password. Something like this http://anatol:pwd@www.proxy.com:8080/ and right way is parse this string and put proxy_user to anatol, proxy_pass to pwd and proxy_url to http://www.proxy.com:8080/ The same with code a bit below when true find_proxy =3D lambda {|u| pxy =3D u.find_proxy; pxy ? [pxy, nil, nil= ] : nil} It should be when true find_proxy =3D lambda {|u| pxy =3D u.find_proxy; pxy ? parse_proxy_and_find_authorization_info(pxy) : nil} Is it logical?? -- anatol (http://pomozov.info) ------=_Part_7485_31986570.1134326990411--