Fix ftpMock
This commit is contained in:
parent
0a6572881e
commit
83f3ade61d
@ -196,8 +196,15 @@ func (mock *ftpMock) listen(t *testing.T) {
|
|||||||
mock.proto.Writer.PrintfLine("350 Restarting at %s. Send STORE or RETRIEVE to initiate transfer", cmdParts[1])
|
mock.proto.Writer.PrintfLine("350 Restarting at %s. Send STORE or RETRIEVE to initiate transfer", cmdParts[1])
|
||||||
case "NOOP":
|
case "NOOP":
|
||||||
mock.proto.Writer.PrintfLine("200 NOOP ok.")
|
mock.proto.Writer.PrintfLine("200 NOOP ok.")
|
||||||
case "OPTS UTF8 ON":
|
case "OPTS":
|
||||||
|
if len(cmdParts) != 3 {
|
||||||
|
mock.proto.Writer.PrintfLine("500 wrong number of arguments")
|
||||||
|
break
|
||||||
|
}
|
||||||
|
if (strings.Join(cmdParts[1:], " ")) == "UTF8 ON" {
|
||||||
mock.proto.Writer.PrintfLine("200 OK, UTF-8 enabled")
|
mock.proto.Writer.PrintfLine("200 OK, UTF-8 enabled")
|
||||||
|
break
|
||||||
|
}
|
||||||
case "REIN":
|
case "REIN":
|
||||||
mock.proto.Writer.PrintfLine("220 Logged out")
|
mock.proto.Writer.PrintfLine("220 Logged out")
|
||||||
case "QUIT":
|
case "QUIT":
|
||||||
|
Loading…
Reference in New Issue
Block a user