Re: libfetch ftp patch for less latency

From: Nate Lawson <nate_at_root.org>
Date: Sat, 07 Apr 2007 10:20:14 -0700
Dag-Erling Smørgrav wrote:
> Dag-Erling Smørgrav <des_at_des.no> writes:
>> Pieter de Goeje <pieter_at_degoeje.nl> writes:
>>> Dag-Erling Smørgrav <des_at_des.no> writes:
>>>> 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.
>> RFC959 does not require or guarantee that the path separator is /, nor
>> that "CD ../foo" does what you expect.  There are also issues when the
>> initial CWD is not / (the document part in an FTP URL is relative to
>> the initial CWD, not absolute)
> 
> I guess I should amend "this is a violation of the FTP protocol" to
> "this relies on assumptions which the FTP RFC does not allow us to
> make, and is a violation of RFC1738"

Obviously, it's easier to do nothing than something.  So here are some
options:

1. Add my patch -- if a server returns an error, I see no way it would
have changed the PWD.  If you say "CD GARBAGE", what reasonable system
would return an error and change to some random dir?

2. Add an env variable (similar to FTP_PASSIVE_MODE, say
"FTP_SINGLE_CWD") which forces the current behavior.  If not set, fetch
tries the multi-method first, falls back to the single-method on error.

-- 
Nate
Received on Sat Apr 07 2007 - 15:20:20 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:39:07 UTC