Bug in libfetch handling of FTP urls..
John Baldwin
jhb at FreeBSD.org
Tue Jun 28 18:14:54 GMT 2005
Ran into this at work. Suppose I am fetching a file over ftp for a user foo
whose home dir is /home/foo' and I want to retrieve the 'bar/baz' file out of
his home directory. According to my understanding of RFC 1378
(http://www.faqs.org/rfcs/rfc1738.html, specifically section 3.2.2), this URL
should work:
fetch ftp://foo@someserver/bar/baz
However, we find that we have to specify the full path:
fetch ftp://foo@someserver/home/foo/bar/baz
It seems that fetch is including the '/' as part of the url-path and doing
'CWD /bar ; RETR baz' rather than treating it as a separator and doing 'CWD
bar; RETR baz'.
I verified this by doing 'fetch -vv' and seeing that it does one big CWD
(instead of the multiple CWD's the RFC says should happen) and that it
includes the leading '/' when it should not.
Also, it seems that fetch ignores the ';type=X' optional part of the url-path
and always uses TYPE I.
--
John Baldwin <jhb at FreeBSD.org> <>< http://www.FreeBSD.org/~jhb/
"Power Users Use the Power to Serve" = http://www.FreeBSD.org
More information about the freebsd-net
mailing list