对 FTP-1 的建议修改
让我总结一下我希望对 FTP-1 做出的具体修改,其中大多数只是为反映现实而作的文档修改:
-
HELP 应当返回 200。所有命令成功时都应返回 2xx,我相信除 HELP 外都是如此。
-
1xx 消息的定义应改为:“对状态查询的信息性应答。这些既不构成肯定也不构成否定的确认。”
-
实验性应答码应为 x9x 或 xx9 的形式,其中第一位数字的选择应反映该应答对自动化用户程序的意义。不允许使用大于 599 的应答码。如果应答属于第二位数字的某个现有类别,则应使用 xx9 形式。鼓励用户程序在可能时通过第一位数字来判断应答的意义,而不是要求特定的应答码。
-
不带参数的 STAT 命令被视为对当前工作目录的目录列表请求,但在传输进行期间它可以与 TELNET SYNCH 一起给出,这时它是对该传输状态的请求。(每个人似乎都做了前半部分。我不确定是否有人真的实现了后半部分。这只是让协议与现实保持一致。)对 STAT 命令的应答应为零条或多条 1xx 消息,后跟一条 200。
-
TYPE P 和 F 表示源文件包含 ASA 控制字符,并且接收方程序在必要时应对其重新格式化。
下面是当前 FTP-1 应答的列表,以及它们在新方案中应如何重新编号。从 4xx 改为 5xx 的改动应自 6 月 1 日起为必须;第二位或第三位数字的改动则不那么重要。(如上文所述,即使有些主机不满足这一要求,也不会造成灾难。)该列表还包含一个改编自 RFC 640 的新的可能应答。
OLD NEW TEXT
0x0 0x0 (These messages are not very well defined nor
very important. Servers should use their judgment.)
100 110 System status reply. (Since nobody does STAT
as in the protocol, this may be a moot point.)
150 150 "File status reply." (If this were really that,
it would be switched to 120, but I believe what is meant is
the response to a bare STAT in mid-transfer, which is more
a connection status reply than a file status reply.
151 121 Directory listing reply.
200 200 Last command ok.
201 251 ABOR ok.
202 252 ABOR ignored, no transfer in progress.
new 206 Command ignored, superfluous here.
230 230 Login complete.
231 231 Logout complete.
232 232 Logout command will be processed when
transfer is complete.
250 250 Transfer started correctly.
251 251 MARK yyyy = mmmm
252 252 Transfer completed ok.
253 223 Rename ok.
254 224 Delete ok.
255 255 SOCK nnnn
256 256 Mail completed ok.
300 300 Connection greeting
301 301 Command incomplete (no crlf)
330 330 Enter password
350 350 Enter mail.
400 huh? "This service not implemented." I don't
understand this; how does it differ from 506? If it means
no FTP at all, who gave the message? Flush.
401 451 Service not accepting users now, goodbye.
430 430 Foo, you are a password hacker!
431 531 Invalid user or password.
432 532 User invalid for this service.
434 454 Logout by operator.
435 455 Logout by system.
436 456 Service shutting down.
450 520 File not found.
451 521 Access denied.
452 452 Transfer incomplete, connection closed.
453 423 Transfer incomplete, insufficient storage space.
454 454 Can't connect to your socket.
500 500 Command gibberish.
501 501 Argument gibberish.
502 502 Argument missing.
503 503 Arguments conflict.
504 504 You can't get there from here.
505 505 Command conflicts with previous command.
506 506 Action not implemented.
[ This RFC was put into machine readable form for entry ]
[ into the online RFC archives by Via Genie 3/00 ]