Bug in libfetch handling of FTP urls..
Dag-Erling Smørgrav
des at des.no
Mon Jul 4 02:48:51 GMT 2005
John Baldwin <jhb at FreeBSD.org> writes:
> 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. [...]
This is tricky because libfetch caches FTP connections, so you can't
always assume that CWD is ~ at the beginning of the transfer if you've
already transferred something from the same host/user/password tuple
in the same process. See (ironically) RFC 1738 section 3.2.5.
Connection caching is an essential feature, because it has a huge
impact on the speed of a network install. Although sysinstall still
uses libftpio + cpio, one may hope that it will one day in the not-
too-distant future switch to libfetch + libarchive.
> 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.
I am currently testing a patch for this.
> Also, it seems that fetch ignores the ';type=X' optional part of the url-path
> and always uses TYPE I.
Correct, that was never implemented. At the very least, the typecode
should be stripped from the URL.
DES
--
Dag-Erling Smørgrav - des at des.no
More information about the freebsd-net
mailing list