Skip to content

Commit

Permalink
Comply with RFC2389
Browse files Browse the repository at this point in the history
Feature listing must begin with a single space (section 3.2)
OPTS must be implemented when FEAT is implemented (section 4)
  • Loading branch information
cuevavirus committed Nov 12, 2019
1 parent 8b5a45d commit 58fd2a9
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion libftpvita/ftpvita.c
Original file line number Diff line number Diff line change
Expand Up @@ -753,10 +753,15 @@ static void cmd_FEAT_func(ftpvita_client_info_t *client)
{
/*So client would know that we support resume */
client_send_ctrl_msg(client, "211-extensions" FTPVITA_EOL);
client_send_ctrl_msg(client, "REST STREAM" FTPVITA_EOL);
client_send_ctrl_msg(client, " REST STREAM" FTPVITA_EOL);
client_send_ctrl_msg(client, "211 end" FTPVITA_EOL);
}

static void cmd_OPTS_func(ftpvita_client_info_t *client)
{
client_send_ctrl_msg(client, "501 bad OPTS" FTPVITA_EOL);
}

static void cmd_APPE_func(ftpvita_client_info_t *client)
{
/* set restore point to not 0
Expand Down Expand Up @@ -793,6 +798,7 @@ static const cmd_dispatch_entry cmd_dispatch_table[] = {
add_entry(SIZE),
add_entry(REST),
add_entry(FEAT),
add_entry(OPTS),
add_entry(APPE),
{NULL, NULL}
};
Expand Down

0 comments on commit 58fd2a9

Please sign in to comment.