1
0
mirror of https://github.com/moparisthebest/curl synced 2024-12-22 08:08:50 -05:00

ftpserver.pl: Fixed imap logout confirmation data

An IMAP server should response with the BYE continuation response before
confirming the LOGOUT command was successful.
This commit is contained in:
Steve Holme 2013-04-26 21:12:36 +01:00
parent 0523152ad6
commit c4067a5678

View File

@ -581,12 +581,12 @@ sub protocolsetup {
'EXAMINE' => \&EXAMINE_imap, 'EXAMINE' => \&EXAMINE_imap,
'FETCH' => \&FETCH_imap, 'FETCH' => \&FETCH_imap,
'LIST' => \&LIST_imap, 'LIST' => \&LIST_imap,
'LOGOUT' => \&LOGOUT_imap,
'SELECT' => \&SELECT_imap, 'SELECT' => \&SELECT_imap,
'STORE' => \&STORE_imap 'STORE' => \&STORE_imap
); );
%displaytext = ( %displaytext = (
'LOGIN' => ' OK We are happy you popped in!', 'LOGIN' => ' OK We are happy you popped in!',
'LOGOUT' => ' OK thanks for the fish',
'welcome' => join("", 'welcome' => join("",
' _ _ ____ _ '."\r\n", ' _ _ ____ _ '."\r\n",
' ___| | | | _ \| | '."\r\n", ' ___| | | | _ \| | '."\r\n",
@ -1004,6 +1004,13 @@ sub EXAMINE_imap {
return 0; return 0;
} }
sub LOGOUT_imap {
sendcontrol "* BYE cURL IMAP server signing off\r\n";
sendcontrol "$cmdid OK LOGOUT completed\r\n";
return 0;
}
################ ################
################ POP3 commands ################ POP3 commands
################ ################