From fb7702f0888e9bdad98f33c09c4048625322a688 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Mon, 26 Apr 2021 11:44:25 +0000 Subject: URIimap: canonicalize uppercases UIDVALIDITY parameter And the UID one, too, as well. This simplifies future comparison and matching code once case is no longer taken into account. --- lib/PublicInbox/URIimap.pm | 3 +++ 1 file changed, 3 insertions(+) (limited to 'lib/PublicInbox/URIimap.pm') diff --git a/lib/PublicInbox/URIimap.pm b/lib/PublicInbox/URIimap.pm index dc193468..df9f5fd9 100644 --- a/lib/PublicInbox/URIimap.pm +++ b/lib/PublicInbox/URIimap.pm @@ -30,6 +30,9 @@ sub canonical { my ($scheme, $auth, $path, $query, $_frag) = uri_split($$self); $path =~ s!\A/+!/!; # excessive leading slash + # upper-case uidvalidity= and uid= parameter names + $path =~ s/;([^=]+)=([^;]*)/;\U$1\E=$2/g; + # lowercase the host portion $auth =~ s#\A(.*@)?(.*?)(?::([0-9]+))?\z# my $ret = ($1//'').lc($2); -- cgit v1.2.3-24-ge0c7