imap test server: Added support for the CAPABILITY command
Added support for the CAPABILITY command in preparation of upcoming changes.
This commit is contained in:
Родитель
65e8ba8e1d
Коммит
b708a522a1
|
@ -579,6 +579,7 @@ sub protocolsetup {
|
|||
}
|
||||
elsif($proto eq 'imap') {
|
||||
%commandfunc = (
|
||||
'CAPABILITY' => \&CAPABILITY_imap,
|
||||
'FETCH' => \&FETCH_imap,
|
||||
'SELECT' => \&SELECT_imap,
|
||||
);
|
||||
|
@ -759,7 +760,28 @@ my $cmdid;
|
|||
# what was picked by SELECT
|
||||
my $selected;
|
||||
|
||||
sub SELECT_imap {
|
||||
sub CAPABILITY_imap {
|
||||
my ($testno) = @_;
|
||||
my $data;
|
||||
|
||||
if(!$support_capa) {
|
||||
sendcontrol "$cmdid BAD Command\r\n";
|
||||
}
|
||||
else {
|
||||
$data = "* CAPABILITY IMAP4";
|
||||
if($support_auth) {
|
||||
$data .= " AUTH=UNKNOWN";
|
||||
}
|
||||
$data .= " pingpong test server\r\n";
|
||||
|
||||
sendcontrol $data;
|
||||
sendcontrol "$cmdid OK CAPABILITY completed\r\n";
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
sub SELECT_IMAP {
|
||||
my ($testno) = @_;
|
||||
my @data;
|
||||
my $size;
|
||||
|
@ -771,7 +793,6 @@ sub SELECT_imap {
|
|||
return 0;
|
||||
}
|
||||
|
||||
|
||||
sub FETCH_imap {
|
||||
my ($testno) = @_;
|
||||
my @data;
|
||||
|
|
Загрузка…
Ссылка в новой задаче