Re: libfetch ftp patch for less latency

From: Rui Paulo <rpaulo_at_fnop.net>
Date: Thu, 29 Mar 2007 18:53:33 +0100
Nate Lawson wrote:
> To speed up pkg_add and other ftp command channel performance over slow
> links, change 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.

Yes, I think this behavior is acceptable. If the pathname fails it only 
adds one more CWD, but reduces the time on the successful cases (which 
are many if you consider the Ports collection).

Dag-Erling Smørgrav wrote:
 > No.  This is a violation of the FTP protocol.
 > [...]
 > 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.

About the possible violation of the RFC, I quote:

       pathname

          Pathname is defined to be the character string which must be
          input to a file system by a user in order to identify a file.
          Pathname normally contains device and/or directory names, and
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
          file name specification.  FTP does not yet specify a standard
          ^^^^^^^^^^^^^^^^^^^^^^^
          pathname convention.  Each user must follow the file naming
          conventions of the file systems involved in the transfer.


          CHANGE WORKING DIRECTORY (CWD)

             This command allows the user to work with a different
             directory or dataset for file storage or retrieval without
             altering his login or accounting information.  Transfer
             parameters are similarly unchanged.  The argument is a
             pathname specifying a directory or other system dependent
             ^^^^^^^^
             file group designator.


I'm not sure why you consider this a violation of the protocol.
Also, considering the reply codes to the CWD command, only 421 seems to 
change the server state.

Have you seen servers that change their state by issuing giving invalid 
arguments to the CWD command ?

Regards,
-- 
Rui Paulo | PGP: F0E4 C7C7 1653 79B7 78DC  DD73 64FA B2C6 CF45 1F84
Received on Thu Mar 29 2007 - 15:53:36 UTC

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