diff options
author | Eric Wong <e@80x24.org> | 2022-07-20 09:24:11 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2022-07-20 16:52:11 +0000 |
commit | b9bc55a39b65d6da9da8bf2ad5daaaa2933ab508 (patch) | |
tree | 170c22bef51625ab745b332eff5ce3f4d978ed24 /t | |
parent | 8abe7e6cda7bc9f8daa4e9cf6ef7e51b356902d5 (diff) | |
download | public-inbox-b9bc55a39b65d6da9da8bf2ad5daaaa2933ab508.tar.gz |
RFC 2449 only documents "EXPIRE 0" behavior for RETR requests which fetch the whole message. TOP requests only fetch the headers and top $N lines of the body, so it's probably harmful for deletions to be triggered in those cases.
Diffstat (limited to 't')
-rw-r--r-- | t/pop3d.t | 11 |
1 files changed, 10 insertions, 1 deletions
@@ -240,8 +240,17 @@ EOF ok(defined($capa->{PIPELINING}), 'pipelining supported by CAPA'); is($capa->{EXPIRE}, 0, 'EXPIRE 0 set'); - # clients which see "EXPIRE 0" can elide DELE requests + # ensure TOP doesn't trigger "EXPIRE 0" like RETR does (cf. RFC2449) my $list = $oldc->list; + ok(scalar keys %$list, 'got a listing of messages'); + ok($oldc->top($_, 1), "TOP $_ 1") for keys %$list; + ok($oldc->quit, 'QUIT after TOP'); + + # clients which see "EXPIRE 0" can elide DELE requests + $oldc = Net::POP3->new(@old_args); + ok($oldc->apop("$locked_mb.0", 'anonymous'), 'APOP for RETR'); + is_deeply($oldc->capa, $capa, 'CAPA unchanged'); + is_deeply($oldc->list, $list, 'LIST unchanged by previous TOP'); ok($oldc->get($_), "RETR $_") for keys %$list; ok($oldc->quit, 'QUIT after RETR'); |