From: Steve Holme Date: Sat, 31 Aug 2013 17:29:15 +0000 (+0100) Subject: ftpserver.pl: Added support for the IMAP CHECK command X-Git-Tag: curl-7_33_0~180 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=497775024c4c2a670b791ef3ac11e94fb50e387b;p=curl ftpserver.pl: Added support for the IMAP CHECK command --- diff --git a/tests/ftpserver.pl b/tests/ftpserver.pl index 489c3f141..f3c84942a 100755 --- a/tests/ftpserver.pl +++ b/tests/ftpserver.pl @@ -578,6 +578,7 @@ sub protocolsetup { %commandfunc = ( 'APPEND' => \&APPEND_imap, 'CAPABILITY' => \&CAPABILITY_imap, + 'CHECK' => \&CHECK_imap, 'CREATE' => \&CREATE_imap, 'DELETE' => \&DELETE_imap, 'EXAMINE' => \&EXAMINE_imap, @@ -1162,6 +1163,17 @@ sub RENAME_imap { return 0; } +sub CHECK_imap { + if ($selected eq "") { + sendcontrol "$cmdid BAD Command received in Invalid state\r\n"; + } + else { + sendcontrol "$cmdid OK CHECK completed\r\n"; + } + + return 0; +} + sub LOGOUT_imap { sendcontrol "* BYE cURL IMAP server signing off\r\n"; sendcontrol "$cmdid OK LOGOUT completed\r\n";