]> Sergey Matveev's repositories - public-inbox.git/blobdiff - lib/PublicInbox/URIimap.pm
treewide: update to v3 Tor onions
[public-inbox.git] / lib / PublicInbox / URIimap.pm
index dc19346815556095f8ae056033f819d20b318905..f6244137000dda3c185737dbc7adc228adbc0a57 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);
@@ -141,4 +144,6 @@ sub scheme {
 
 sub as_string { ${$_[0]} }
 
+sub clone { ref($_[0])->new(as_string($_[0])) }
+
 1;