]> Sergey Matveev's repositories - public-inbox.git/blobdiff - lib/PublicInbox/URIimap.pm
URIimap: canonicalize uppercases UIDVALIDITY parameter
[public-inbox.git] / lib / PublicInbox / URIimap.pm
index dc19346815556095f8ae056033f819d20b318905..df9f5fd9ebeff2040066afac23ef0655c362f42c 100644 (file)
@@ -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);