about summary refs log tree commit homepage
path: root/t/imapd.t
diff options
context:
space:
mode:
authorEric Wong <e@yhbt.net>2020-06-10 07:04:37 +0000
committerEric Wong <e@yhbt.net>2020-06-13 07:55:45 +0000
commit49175649b3e49cdd5f2ac857cb91e69a5b91a739 (patch)
tree0d79deb03f67a58c2c1e6bcb5d75e004a6004e55 /t/imapd.t
parent509c2cc25c8f21b4e1685de8b475629559c9b2aa (diff)
downloadpublic-inbox-49175649b3e49cdd5f2ac857cb91e69a5b91a739.tar.gz
IMAP RFC 3501 stipulates case-insensitive comparisons, and so
does RFC 977 (NNTP).  However, INN (nnrpd) uses case-sensitive
comparisons, so we've always used case-sensitive comparisons for
NNTP to match nnrpd behavior.

Unfortunately, some IMAP clients insist on sending "INBOX" with
caps, which causes problems for us.  Since NNTP group names are
typically all lowercase anyways, just force all comparisons to
lowercase for IMAP and warn admins if uppercase-containing
newsgroups won't be accessible over IMAP.

This ensures our existing -nntpd behavior remains unchanged
while being compatible with the expectations of real-world IMAP
clients.
Diffstat (limited to 't/imapd.t')
-rw-r--r--t/imapd.t2
1 files changed, 1 insertions, 1 deletions
diff --git a/t/imapd.t b/t/imapd.t
index 2c4315de..a5324f78 100644
--- a/t/imapd.t
+++ b/t/imapd.t
@@ -88,7 +88,7 @@ like($e, qr/\bNO\b/, 'got a NO on EXAMINE for non-existent');
 ok(!$mic->select('foo') && ($e = $@), 'EXAMINE non-existent');
 like($e, qr/\bNO\b/, 'got a NO on EXAMINE for non-existent');
 ok($mic->select('inbox.i1'), 'SELECT succeeds');
-ok($mic->examine('inbox.i1'), 'EXAMINE succeeds');
+ok($mic->examine('INBOX.i1'), 'EXAMINE succeeds');
 my @raw = $mic->status('inbox.i1', qw(Messages uidnext uidvalidity));
 is(scalar(@raw), 2, 'got status response');
 like($raw[0], qr/\A\*\x20STATUS\x20inbox\.i1\x20