Skip to content

Commit

Permalink
Allow specifying non-print (#391)
Browse files Browse the repository at this point in the history
  • Loading branch information
siminn-arnorgj authored Jan 24, 2023
1 parent 4c78a0b commit 57c858f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion handle_misc.go
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
4 changes: 4 additions & 0 deletions handle_misc_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 57c858f

Please sign in to comment.