libfetch ftp patch for less latency
Pieter de Goeje
pieter at degoeje.nl
Thu Mar 29 17:31:50 UTC 2007
On donderdag 29 maart 2007, Dag-Erling Smørgrav wrote:
> Nate Lawson <nate at root.org> writes:
> > To speed up pkg_add and other ftp command channel performance over slow
> >
> > links, change this:
> >>>> PWD
> >
> > <<< 257 "/"
> >
> >>>> CWD pub
> >
> > <<< 250 Directory successfully changed.
> >
> >>>> CWD FreeBSD
> >
> > <<< 250 Directory successfully changed.
> >
> >>>> CWD ports
> >
> > <<< 250 Directory successfully changed.
> >
> >>>> CWD amd64
> >
> > <<< 250 Directory successfully changed.
> >
> >>>> CWD packages-6-stable
> >
> > <<< 250 Directory successfully changed.
> >
> >>>> CWD Latest
> >
> > <<< 250 Directory successfully changed.
> >
> >>>> MODE S
> >
> > Into this:
> >>>> PWD
> >
> > <<< 257 "/"
> >
> >>>> CWD pub/FreeBSD/ports/amd64/packages-6-stable/Latest
Why not put the / before the path? That way you don't need to 'PWD' first.
> >
> > <<< 250 Directory successfully changed.
>
> No. This is a violation of the FTP protocol.
I'm reading rfc 959 right now, and it include examples of CWD with full
pathname (multiple directories). Actually the rfc is kinda vague about this.
>
> > All ftp servers I've ever seen support a full path when changing down
> > dirs. This might be a DOS ftp server thing however. In any case, if
> > there is an error to the all-in-one CWD, the code reverts back to legacy
> > behavior of multiple CWDs.
>
> When the all-in-one CWD fails, you're SOL. You have no idea what
> state the server is in, and you have to start over.
Agreed.
>
> DES
Regards,
Pieter de Goeje
More information about the freebsd-current
mailing list