summaryrefslogtreecommitdiff
path: root/tests/ftpserver.pl
diff options
context:
space:
mode:
authorNicklas Avén <nicklas.aven@jordogskog.no>2018-07-31 13:12:18 +0200
committerDaniel Stenberg <daniel@haxx.se>2018-09-06 10:57:48 +0200
commit6987fcef657710f800b05dd79ff744087b15c73d (patch)
tree47fcd664dcf9f7ee1b274c88eaa75e1faccf0837 /tests/ftpserver.pl
parent2825f46d950ca9b0e269ed8dc6a97c5238a17c30 (diff)
downloadcurl-6987fcef657710f800b05dd79ff744087b15c73d.tar.gz
imap: change from "FETCH" to "UID FETCH"
... and add "MAILINDEX". As described in #2789, this is a suggested solution. Changing UID=xx to actually get mail with UID xx and add "MAILINDEX" to get a mail with a special index in the mail box (old behavior). So MAILINDEX=1 gives the first non deleted mail in the mail box. Fixes #2789 Closes #2815
Diffstat (limited to 'tests/ftpserver.pl')
-rwxr-xr-xtests/ftpserver.pl8
1 files changed, 7 insertions, 1 deletions
diff --git a/tests/ftpserver.pl b/tests/ftpserver.pl
index 97f7b8ea5..d401be24c 100755
--- a/tests/ftpserver.pl
+++ b/tests/ftpserver.pl
@@ -1560,7 +1560,13 @@ sub UID_imap {
if ($selected eq "") {
sendcontrol "$cmdid BAD Command received in Invalid state\r\n";
}
- elsif (($command ne "COPY") && ($command ne "FETCH") &&
+ elsif (substr($command, 0, 5) eq "FETCH"){
+ my $func = $commandfunc{"FETCH"};
+ if($func) {
+ &$func($args, $command);
+ }
+ }
+ elsif (($command ne "COPY") &&
($command ne "STORE") && ($command ne "SEARCH")) {
sendcontrol "$cmdid BAD Command Argument\r\n";
}