]> Sergey Matveev's repositories - public-inbox.git/commitdiff
www: support `+' in inbox names
authorEric Wong <e@80x24.org>
Sun, 21 Aug 2022 22:21:00 +0000 (22:21 +0000)
committerEric Wong <e@80x24.org>
Mon, 22 Aug 2022 01:09:02 +0000 (01:09 +0000)
`+' already seemed to works for IMAP mailboxes and NNTP newsgroup
names and git-config doesn't complain, either.  So allow it as
the path components of WWW URLs so projects like `libstdc++' can
use it.

Reported-by: Mark Wielaard <mark@klomp.org>
Tested-by: Mark Wielaard <mark@klomp.org>
Link: https://public-inbox.org/meta/YwKnFCvganW7ErXU@wildebeest.org/
lib/PublicInbox/WWW.pm

index 755d75585df22a18ab495d844705fd075cf57f45..a33709e96fc918867ed9f7a05623f19e29597a03 100644 (file)
@@ -23,7 +23,7 @@ use PublicInbox::WwwStatic qw(r path_info_raw);
 use PublicInbox::Eml;
 
 # TODO: consider a routing tree now that we have more endpoints:
-our $INBOX_RE = qr!\A/([\w\-][\w\.\-]*)!;
+our $INBOX_RE = qr!\A/([\w\-][\w\.\-\+]*)!;
 our $MID_RE = qr!([^/]+)!;
 our $END_RE = qr!(T/|t/|t\.mbox(?:\.gz)?|t\.atom|raw|)!;
 our $ATTACH_RE = qr!([0-9][0-9\.]*)-($PublicInbox::Hval::FN)!;