From: Warren Brown Date: 2005-08-27T04:09:17+09:00 Subject: Re: uri test failures. (Re: [ruby-cvs] ruby/lib, ruby/lib/uri: Lovely RDOC patches from mathew (metaATpoboxDOTcom) on URI/* and getoptlong.rb) mathew, > As documented in RFC 1738 section 3.2.2 (and now > documented in the classes too), > ftp://ftp.example.com/foo/bar/file.ext should parse > into a server of ftp.example.com, and a path of > foo/bar/file.ext with no leading slash. > > If you want a leading slash on your chdir command, > you need to escape it in the URL, e.g. > ftp://ftp.example.com/%2Ffoo/bar/file.ext. As I pointed out in http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-core/5285 (the last time this issue came up), RFC1738 was updated by RFC1808 and RFC2396 to include FTP URLs under the URI "umbrella". This means that although the second slash *is* required for absolute paths, it is *not* required to be encoded as "%2F", it can just be a regular slash ("/"). So the second paragraph above should read "If you want a leading slash on your chdir command, you need to insert a second slash (e.g. 'ftp://ftp.example.com//foo/bar/file.ext')." Hopefully the patched code allows this as well. - Warren Brown