about summary refs log tree commit homepage
path: root/lib/PublicInbox/WatchMaildir.pm
diff options
context:
space:
mode:
authorEric Wong <e@yhbt.net>2020-04-23 08:34:19 +0000
committerEric Wong <e@yhbt.net>2020-04-25 04:41:38 +0000
commitb70473ab8296d31ebb600adb4fa8fe0ac5935ca8 (patch)
tree35c2fe7fc6bd9a82e6aff5d4ba8e845bc1320534 /lib/PublicInbox/WatchMaildir.pm
parente5a139171c3d9bfa23c4da009839cd6eafe3dae1 (diff)
downloadpublic-inbox-b70473ab8296d31ebb600adb4fa8fe0ac5935ca8.tar.gz
RFC 2919 section 6 states the following:

  There is only one operation defined for list identifiers,
  that of case insensitive equality.

So no arguing with that.  Now, the other headers are
open to interpretation, so put a note about them.
Diffstat (limited to 'lib/PublicInbox/WatchMaildir.pm')
-rw-r--r--lib/PublicInbox/WatchMaildir.pm7
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/PublicInbox/WatchMaildir.pm b/lib/PublicInbox/WatchMaildir.pm
index 02e4b32f..71bd84fc 100644
--- a/lib/PublicInbox/WatchMaildir.pm
+++ b/lib/PublicInbox/WatchMaildir.pm
@@ -62,12 +62,17 @@ sub new {
                         if (my $whs = $ibx->{watchheader}) {
                                 for (@$whs) {
                                         my ($k, $v) = split(/:/, $_, 2);
+                                        # XXX should this be case-insensitive?
+                                        # Or, mutt-style, case-sensitive iff
+                                        # a capital letter exists?
                                         push @$watch_hdrs, [ $k, qr/\Q$v\E/ ];
                                 }
                         }
                         if (my $list_ids = $ibx->{listid}) {
                                 for (@$list_ids) {
-                                        my $re = qr/<[ \t]*\Q$_\E[ \t]*>/;
+                                        # RFC2919 section 6 stipulates
+                                        # "case insensitive equality"
+                                        my $re = qr/<[ \t]*\Q$_\E[ \t]*>/i;
                                         push @$watch_hdrs, ['List-Id', $re ];
                                 }
                         }