From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dcvr.yhbt.net (dcvr.yhbt.net [173.255.242.215]) by sourceware.org (Postfix) with ESMTPS id 02AFE3858D3C for ; Sun, 21 Aug 2022 22:21:45 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 02AFE3858D3C Received: from localhost (dcvr.yhbt.net [127.0.0.1]) by dcvr.yhbt.net (Postfix) with ESMTP id 2D7F11F54E; Sun, 21 Aug 2022 22:21:44 +0000 (UTC) Date: Sun, 21 Aug 2022 22:21:00 +0000 From: Eric Wong To: Mark Wielaard Cc: overseers@sourceware.org, meta@public-inbox.org Subject: [PATCH] www: support `+' in inbox names Message-ID: <20220821222100.M607159@dcvr> References: <20220821205338.M316466@dcvr> <20220821221143.M305678@dcvr> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20220821221143.M305678@dcvr> X-Spam-Status: No, score=-10.8 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_BARRACUDACENTRAL, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: overseers@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Overseers mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 21 Aug 2022 22:21:46 -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 Tested-by: Mark Wielaard Link: https://public-inbox.org/meta/YwKnFCvganW7ErXU@wildebeest.org/ --- There should be better test coverage for this at some point, but I suppose this is good enough for now as I'm hacking on a more interesting part of this project :> lib/PublicInbox/WWW.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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)!;