From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: X-Spam-Status: No, score=-4.2 required=3.0 tests=ALL_TRUSTED,BAYES_00, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, T_SCC_BODY_TEXT_LINE shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 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) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=80x24.org; s=selector1; t=1661120504; bh=4Myz5yLTr26V/ts9U8DHQ+7v3fbM9qbSzUZ1oiZWvfg=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=xqd5LT/x5OToF7dC8KOD6WlHq27fhVJKWLrbrmh5eGcpUSezERR6Wd2XLcX1tdZzM D6vCAl73ulxwZiKg8zp9+pLcyWlyTK3T/IPgSjaFxkr33FW+xJHl3fPUJdYumMwKS0 AmloLmMUHHy16AtmcxQQ71Iqja+H2AoKuD5Z0k6A= 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> List-Id: `+' 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)!;