From 028c56061e820211f5757a49bf4da30198b29e29 Mon Sep 17 00:00:00 2001 From: Michal Sojka Date: Mon, 26 May 2014 16:05:57 +0200 Subject: Make parsing of References and In-Reply-To header less error prone According to RFC2822 References and In-Reply-To headers are supposed to contain one or more Message-IDs, however older RFC822 allowed almost any content. When both References and In-Reply-To headers ends with something else that a Message-ID (see e.g. [1]), the thread structure presented by notmuch is incorrect. The reason is that notmuch treats this case as if the email contained no "replyto" information (see _notmuch_database_link_message_to_parents). This patch changes the parse_references() function to return the last valid Message-ID encountered rather than NULL resulting from the last hunk of text not being the Message-ID. [1] https://lkml.org/lkml/headers/2014/5/19/864 --- test/T510-thread-replies.sh | 1 - 1 file changed, 1 deletion(-) (limited to 'test') diff --git a/test/T510-thread-replies.sh b/test/T510-thread-replies.sh index d818b89f..1392fbed 100755 --- a/test/T510-thread-replies.sh +++ b/test/T510-thread-replies.sh @@ -138,7 +138,6 @@ expected=`echo "$expected" | notmuch_json_show_sanitize` test_expect_equal_json "$output" "$expected" test_begin_subtest "Ignore garbage at the end of References" -test_subtest_known_broken add_message '[id]="foo@five.com"' \ '[subject]="five"' add_message '[id]="bar@five.com"' \ -- cgit v1.2.3