file.
The arguments of any CWD commands are successive segment parts of
the URL delimited by slash, and the final segment is suitable as
the filename argument to the RETR command for retrieval or the
directory argument to NLIST.
For some file systems (Unix in particular), the "/" used to denote
the hierarchical structure of the URL corresponds to the delimiter
used to construct a file name hierarchy, and thus, the filename
will look the same as the URL path. This does NOT mean that the
URL is a Unix filename.
Note: Retrieving subsequent URLs from the same host
There is no common hierarchical model to the FTP protocol, so if a
directory change command has been given, it is impossible in
general to deduce what sequence should be given to navigate to
another directory for a second retrieval, if the paths are
different. The only reliable algorithm is to disconnect and
reestablish the control connection.
Data type
The data content type of a file can only, in the general FTP case,
be deduced from the name, normally the suffix of the name. This
is not standardized. An alternative is for it to be transferred in
information outside the URL. A suitable FTP transfer type (for
example binary "I" or text "A") must in turn be deduced from the
data content type. It is recommended that conventions for
suffixes of public archives be established, but it is outside the
scope of this standard.
An FTP URL may optionally specify the FTP data transfer type by
which an object is to be retrieved. Most of the methods correspond
to the FTP "Data Types" ASCII and IMAGE for the retrieval of a
document, as specified in FTP by the TYPE command. One method
indicates directory access.
RFC 1630 URIs in WWW June 1994
The data type is specified by a suffix to the URL. Possible
suffixes are:
;type = Use FTP type as given to perform data
transfer.
/ Use FTP directory list commands to read
directory
The type code is in the format defined in RFC 959 except that THE
SPACE IS OMITTED FROM THE URL.
Transfer Mode
Stream Mode is always used.
Gopher
The gopher URL specifies the host and optionally the port to which
the client should connect. This is followed by a slash and a single
gopher type code. This type code is used by the client to determine
how to interpret the server's reply and is is not for sending to
server. The command string to be sent to the server immediately
follows the gopher type character. It consists of the gopher
selector string followed by any "Gopher plus" syntax, but always
omitting the trainling CR LF pair.
When the gopher command string contains characters (such a embedded
CR LF and HT characters) not allowed in a URL, these are encoded
using the conventional encoding.
Note that some gopher selector strings begin with a copy of the
gopher type character, in which case that character will occur twice
consecutively. Also note that the gopher selector string may be an
empty string since this is how gopher clients refer to the top-level
directory on a gopher server.
If the encoded command string (with trailing CR LF stripped) would be
void then the gopher type character may be omiited and "1" (ASCII 31
hex) is assumed.
Note that slash "/" in gopher selector strings may not correspond to
a level in a hierarchical structure.
RFC 1630 URIs in WWW June 1994
=9= |