Chinaunix首页 | 论坛 | 博客
  • 博客访问: 4012297
  • 博文数量: 536
  • 博客积分: 10470
  • 博客等级: 上将
  • 技术积分: 4825
  • 用 户 组: 普通用户
  • 注册时间: 2006-05-26 14:08
文章分类

全部博文(536)

文章存档

2024年(3)

2021年(1)

2019年(1)

2017年(1)

2016年(2)

2013年(2)

2012年(10)

2011年(43)

2010年(10)

2009年(17)

2008年(121)

2007年(252)

2006年(73)

分类:

2008-05-21 14:23:06

According to the specification of URL formats, , an FTP URL is of the form

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:

user
a user name (user id) on the host
password
the password corresponding to the user name; note: if the user and password field in a URL contains character : or @ or /, the character must be
host
the fully qualified domain name of a network host, or its IP address
port
the port number to connect to; it omitted, defaults to 21
path
path specification of the form
cwd1/cwd2/.../cwdN/name
(where any occurrence of / or ; within a cwdi or the name must be ) optionally followed by
;type=typecode
where typecode is one of the characters 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.

阅读(1677) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~