分类:
2008-05-21 14:23:06
ftp://
user:
password@
host:
port/
path
so that some or all of the parts
user:
password@
,
:
password,
:
port
and
/
path
may be excluded. Although RFC 1738 has been obsoleted
as regards to generic URL syntax (now
defined in
), some of the specific parts, like
FTP URL syntax, are still in force.
The components obey the following rules:
:
or @
or
/
, the character must be
/
cwd2/
.../
cwdN/
name
/
or ;
within
a cwdi or the name must be
)
optionally followed by
;type=
typecode
a
, i
, d
Effectively, ;type=a
means
"Ascii mode" (plain text mode) of transfer whereas
;type=i
means image (binary) mode.
If the ;type=
typecode part of an FTP URL
is
omitted, the client program interpreting the URL must guess the
appropriate mode to use. In general, the data content type of a file
can only be guessed from the name, e.g., from the suffix of the name;
the appropriate type code to be used for transfer of the file can
then be deduced from the data content of the file.