Thread (8 messages) flat view 8 messages, 6 authors, 2021-12-08

Re: [RFC PATCH v1 1/1] docs: add the new commit-msg tags 'Reported:' and 'Reviewed:'

From: Eric Wong <hidden>
Date: 2021-11-29 17:28:25
Also in: lkml, workflows

Jani Nikula [off-list ref] wrote:
From the RFC nitpicking department, msg-id is allowed to contain CFWS
(comments and folding white space) outside the angle brackets, which
means you could have RFC compliant Message-ID header field:

Message-ID: 
  [off-list ref]

or

Message-ID: (comment) 
  [off-list ref]

or even worse, really.

The moral of the story is that you should always offload the header
parsing to some tool or library designed to do that.
It's a bit much for common cases with git-send-email and
reasonable MUAs, I think.  I don't know if formail is commonly
installed, nowadays...

Fwiw, the code running lore uses something like this:

	/^Message-ID:[ \t]*([^\n]*\r?\n # 1st line
			# continuation lines:
			(?:[^:\n]*?[ \t]+[^\n]*\r?\n)*)
			/ismx

I'm fine with this non-trivial regexp being included with
GPL-2.0 code; but it could be too big for a one-liner *shrug*

... And <([^>]+)>/s to extract Message-IDs, but ISTR the code
behind lore doesn't handle spaces inside <> properly, but I'm
not sure if there's enough valid, non-spam messages with them...
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help