unofficial mirror of meta@public-inbox.org
 help / color / mirror / Atom feed
From: Kyle Meyer <kyle@kyleam.com>
To: Mukund Sivaraman <muks@mukund.org>
Cc: meta@public-inbox.org
Subject: Re: Message-ID not found
Date: Tue, 24 May 2022 19:39:32 -0400	[thread overview]
Message-ID: <871qwiqz4b.fsf@kyleam.com> (raw)
In-Reply-To: <Yo1c3oSzBKsRgQ4z@d1>

Mukund Sivaraman writes:

> I'm testing public-inbox with a "test-list" to try to provide a HTTP
> interface to mailing list archives. I'm using stock
> public-inbox-1.7.0-2.fc35.noarch on Fedora 35.
>
> List emails are injected by public-inbox-mda. public-inbox-httpd
> displays an error at this URL:
>
> https://inbox.banu.com/test-list/Yo1VM9+M%252FsYJIZkN@d1/T/

What's the source of this URL?  The slash looks percent-encoded one too
many times:

                  message ID: Yo1VM9+M/sYJIZkN@d1
                     |   /  -> %2F
                     V
        percent-encoded once: Yo1VM9+M%2FsYJIZkN@d1
                     |   %  -> %25
                     V
       percent-encoded twice: Yo1VM9+M%252FsYJIZkN@d1


> "Message-ID <Yo1VM9+M/sYJIZkN@d1/T> not found"

Hmm, I'm surprised by the trailing "/T".  When I visit the above URL, I
see

  Message-ID <Yo1VM9+M%2FsYJIZkN@d1>
  not found

which is what I would expect.

> The ASCII encoded Message-ID is "Yo1VM9+M/sYJIZkN@d1" generated by the
> Mutt client.
>
> The corresponding message exists:
> https://inbox.banu.com/test-list/Yo1VM9+M%2FsYJIZkN@d1/

Yes, the looks to match the URL you'd get by percent-encoding the "/"
once (see above).

> Could someone please check what the bug could be?
>
> Does public-inbox-httpd have a problem with the '/' character in
> Message-IDs?

Here's what https://inbox.banu.com/test-list/_/text/help/ says about
slashes:

  Forward slash ('/') characters in the Message-IDs
  need to be escaped as "%2F" (without quotes).

And here's the escaping that public-inbox does on the message ID
(<https://public-inbox.org/public-inbox.git/tree/lib/PublicInbox/MID.pm?h=v1.8.0#n130>):

  # RFC3986, section 3.3:
  sub MID_ESC () { '^A-Za-z0-9\-\._~!\$\&\'\(\)\*\+,;=:@' }
  sub mid_escape ($) { uri_escape_utf8($_[0], MID_ESC) }

  reply	other threads:[~2022-05-24 23:39 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-24 22:31 Message-ID not found Mukund Sivaraman
2022-05-24 23:39 ` Kyle Meyer [this message]
2022-05-24 23:59   ` Mukund Sivaraman
2022-05-25  1:44     ` Kyle Meyer
2022-05-25  2:19       ` Mukund Sivaraman
2022-05-25  6:05         ` Mukund Sivaraman
2022-05-25  9:00           ` 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=871qwiqz4b.fsf@kyleam.com \
    --to=kyle@kyleam.com \
    --cc=meta@public-inbox.org \
    --cc=muks@mukund.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).