mirror of
https://github.com/moparisthebest/curl
synced 2024-08-13 17:03:50 -04:00
ftpserver.pl: Updated IMAP EXAMINE handler to use dynamic test data
This commit is contained in:
parent
d737aa19c8
commit
2ef83136d4
@ -1001,14 +1001,21 @@ sub EXAMINE_imap {
|
|||||||
|
|
||||||
logmsg "EXAMINE_imap got test $testno\n";
|
logmsg "EXAMINE_imap got test $testno\n";
|
||||||
|
|
||||||
# Example from RFC 3501, 6.3.2. EXAMINE Command
|
$testno =~ s/[^0-9]//g;
|
||||||
sendcontrol "* 17 EXISTS\r\n";
|
my $testpart = "";
|
||||||
sendcontrol "* 2 RECENT\r\n";
|
if ($testno > 10000) {
|
||||||
sendcontrol "* OK [UNSEEN 8] Message 8 is first unseen\r\n";
|
$testpart = $testno % 10000;
|
||||||
sendcontrol "* OK [UIDVALIDITY 3857529045] UIDs valid\r\n";
|
$testno = int($testno / 10000);
|
||||||
sendcontrol "* OK [UIDNEXT 4392] Predicted next UID\r\n";
|
}
|
||||||
sendcontrol "* FLAGS (\\Answered \\Flagged \\Deleted \\Seen \\Draft)\r\n";
|
|
||||||
sendcontrol "* OK [PERMANENTFLAGS ()] No permanent flags permitted\r\n";
|
loadtest("$srcdir/data/test$testno");
|
||||||
|
|
||||||
|
my @data = getpart("reply", "data$testpart");
|
||||||
|
|
||||||
|
for my $d (@data) {
|
||||||
|
sendcontrol $d;
|
||||||
|
}
|
||||||
|
|
||||||
sendcontrol "$cmdid OK [READ-ONLY] EXAMINE completed\r\n";
|
sendcontrol "$cmdid OK [READ-ONLY] EXAMINE completed\r\n";
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user