Andrew Gillham wrote:
> Then ftpget is not handling it correctly. Using debug mode, it does
> something like this:
>
> Open FTP connection to update.symantec.com
> USER cust-read
> PASS Rcus-01#
> RETR opt/content/onramp/livetri.zip
Yes. Apparently it optimizes the request to a single RETR, skipping the
CWD part.. Not entirely by the HTTP specification, but almost safe (it
is safe for all known anonymous FTP...).
> Nowhere in here is a CWD. Since the working directory is not '/', the
> RETR fails. To me, this is not correct behavior. If ftpget is not going
> to do CWDs for this request, then it should honor the full path given
> right?
It does, assuming the FTP server honors UNIX style paths it is a close
approximation of the HTTP specification. It will however break on some
obscure FTP servers that don't use UNIX style paths (i.e. where it is
nessesary to do some CWD commands in order to be able to do a RETR, or
where / is not interpreated as directory separator). As long as the FTP
server contacted fully understands about UNIX paths (where the whole
file tree is accessible translated to UNIX style paths) it is going to
give the same result as first doing CWDs and then RETR.
> So ftpget should do this:
>
> Open FTP connection to update.symantec.com
> USER cust-read
> PASS Rcus-01#
> CWD opt
> CWD content
> CWD onramp
> RETR livetri.zip
Yes, that is the specified behaviour if not optimized a single bit.
> or:
> Open FTP connection to update.symantec.com
> USER cust-read
> PASS Rcus-01#
> RETR /opt/content/onramp/livetri.zip
No. This is entirely different, and NOT according to the HTTP
specification. The key issue is that in UNIX /opt which is not the same
as opt (the first is a absolute UNIX path, the second is relative to the
current working directory)
> IMHO any other behavior is a bug.
Any other? The two examples you gave are quite different. The first one
is almost the same as the current implementation in ftpget (it accesses
the same file, at least on this UNIX ftp server), the second one is
not..
--- Henrik NordströmReceived on Sat Oct 11 1997 - 11:30:12 MDT
This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:37:16 MST