unofficial mirror of meta@public-inbox.org
 help / color / mirror / Atom feed
From: Eric Wong <e@80x24.org>
To: Mark Wielaard <mark@klomp.org>
Cc: overseers@sourceware.org, meta@public-inbox.org
Subject: Re: Using plus (+) in list name
Date: Sun, 21 Aug 2022 22:11:43 +0000	[thread overview]
Message-ID: <20220821221143.M305678@dcvr> (raw)
In-Reply-To: <YwKnFCvganW7ErXU@wildebeest.org>

Mark Wielaard <mark@klomp.org> wrote:
> On Sun, Aug 21, 2022 at 08:53:38PM +0000, Eric Wong via Overseers wrote:
> > Mark Wielaard <mark@klomp.org> wrote:
> > Interesting that NNTP and IMAP work (I wasn't expecting it :x).
> > 
> > I can't remember off the top of my head, but is '+' allowed by
> > the relevant NNTP and List-Id RFCs?
> 
> I don't know. I just observed that I can see the group name
> inbox.gcc.libstdc++ in my nttp and imap readers when pointing at
> inbox.sourceware.org.

I suppose it's OK as long as real-world clients are happy.

> > +++ 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)!;
> 
> That works! https://inbox.sourceware.org/libstdc++ looks fully
> functional now.

Good to know.  I'll make a patch ASAP and maybe some tests
down-the-line...

> Now to figure out how to properly include that patch before the other
> sourceware overseers figure out I patched the packaged code in place.

If you're using a .psgi config file to customize the middleware
layer, you should be able to access `our' vars through it:

diff --git a/examples/public-inbox.psgi b/examples/public-inbox.psgi
index e017b2fb..36cd8b57 100644
--- a/examples/public-inbox.psgi
+++ b/examples/public-inbox.psgi
@@ -14,6 +14,7 @@ use strict;
 use warnings;
 use PublicInbox::WWW;
 use Plack::Builder;
+$PublicInbox::WWW::INBOX_RE = qr!\A/([\w\-][\w\.\-\+]*)!;
 my $www = PublicInbox::WWW->new;
 $www->preload;
 
There's a bunch of `our' vars which happens to be accessible across
namespaces, some with the intent of being tweaked by end users,
some for internal-use only.

I can't remember what reasoning I had for making $INBOX_RE
globally-accessible, but I'm fine with it used in this way.

  reply	other threads:[~2022-08-21 22:11 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-21 20:02 Using plus (+) in list name Mark Wielaard
2022-08-21 20:53 ` Eric Wong
2022-08-21 21:43   ` Mark Wielaard
2022-08-21 22:11     ` Eric Wong [this message]
2022-08-21 22:21       ` [PATCH] www: support `+' in inbox names Eric Wong

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://public-inbox.org/README

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220821221143.M305678@dcvr \
    --to=e@80x24.org \
    --cc=mark@klomp.org \
    --cc=meta@public-inbox.org \
    --cc=overseers@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).