[PATCH v1] tools: fix parsing message-id in the headers of email
Aaron Conole
aconole at redhat.com
Thu Dec 7 20:07:20 CET 2023
Min Zhou <zhoumin at loongson.cn> writes:
> Some email has the message-id header named "Message-id", like this:
> https://patches.dpdk.org/project/dpdk/patch/20230930010024.34377-1-rdna@apple.com/.
> So add the parsing for this kind of email.
>
> Signed-off-by: Min Zhou <zhoumin at loongson.cn>
> ---
Hi Min,
I wonder - we will keep having this issue of these header fields being
incorrectly matched based on case issues.
Maybe we should make getheader have the ability to ignore case, or pass
something like Message-[iI][dD] as the header argument.
WDYT?
> tools/parse-email.sh | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/tools/parse-email.sh b/tools/parse-email.sh
> index 9cb9583..fbe038a 100755
> --- a/tools/parse-email.sh
> +++ b/tools/parse-email.sh
> @@ -35,6 +35,7 @@ subject=$(getheader Subject "$1")
> from=$(getheader From "$1")
> msgid=$(getheader Message-Id "$1")
> [ -n "$msgid" ] || msgid=$(getheader Message-ID "$1")
> +[ -n "$msgid" ] || msgid=$(getheader Message-id "$1")
> pwid=$(getheader X-Patchwork-Id "$1")
> listid=$(getheader List-Id "$1")
> reply=$(getheader In-Reply-To "$1")
More information about the ci
mailing list