diff --git a/handle_misc.go b/handle_misc.go index e7cd8d04..a197c3f1 100644 --- a/handle_misc.go +++ b/handle_misc.go @@ -262,7 +262,7 @@ func (c *clientHandler) handleTYPE(param string) error { case "I", "L8": c.currentTransferType = TransferTypeBinary c.writeMessage(StatusOK, "Type set to binary") - case "A", "L7": + case "A", "AN", "L7": c.currentTransferType = TransferTypeASCII c.writeMessage(StatusOK, "Type set to ASCII") default: diff --git a/handle_misc_test.go b/handle_misc_test.go index d69e3c5d..d08b5ff1 100644 --- a/handle_misc_test.go +++ b/handle_misc_test.go @@ -297,6 +297,10 @@ func TestTYPE(t *testing.T) { require.NoError(t, err) require.Equal(t, StatusOK, rc) + rc, _, err = raw.SendCommand("TYPE A N") + require.NoError(t, err) + require.Equal(t, StatusOK, rc) + rc, _, err = raw.SendCommand("TYPE i") require.NoError(t, err) require.Equal(t, StatusOK, rc)