From: Eric Wong Date: Sun, 21 Aug 2022 22:21:00 +0000 (+0000) Subject: www: support `+' in inbox names X-Git-Url: http://www.git.stargrave.org/?a=commitdiff_plain;h=74a504208be624c438cbdec955d5eacace29d626;p=public-inbox.git www: support `+' in inbox names `+' 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 Tested-by: Mark Wielaard Link: https://public-inbox.org/meta/YwKnFCvganW7ErXU@wildebeest.org/ --- diff --git a/lib/PublicInbox/WWW.pm b/lib/PublicInbox/WWW.pm index 755d7558..a33709e9 100644 --- a/lib/PublicInbox/WWW.pm +++ b/lib/PublicInbox/WWW.pm @@ -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)!;