Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 29 Mar 2007 18:53:33 +0100
From:      Rui Paulo <rpaulo@fnop.net>
To:        Nate Lawson <nate@root.org>, =?ISO-8859-1?Q?Dag-Erling_Sm=F8rgrav?= <des@des.no>
Cc:        current@FreeBSD.org
Subject:   Re: libfetch ftp patch for less latency
Message-ID:  <460BFD1D.9000402@fnop.net>
In-Reply-To: <460AE39B.4070706@root.org>
References:  <460AE39B.4070706@root.org>

next in thread | previous in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?460BFD1D.9000402>