Re: [PATCH 1/2] Add Google Inc. to AUTHORS as a contributor.
[notmuch-archives.git] / eb / f7803815dc6fbbfb200e317ec962aa5762e2e5
1 Return-Path: <stewart@flamingspork.com>\r
2 X-Original-To: notmuch@notmuchmail.org\r
3 Delivered-To: notmuch@notmuchmail.org\r
4 Received: from localhost (localhost [127.0.0.1])\r
5         by olra.theworths.org (Postfix) with ESMTP id C9102431FD0\r
6         for <notmuch@notmuchmail.org>; Mon, 16 May 2011 19:10:35 -0700 (PDT)\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
8 X-Spam-Flag: NO\r
9 X-Spam-Score: 0\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[none]\r
12         autolearn=disabled\r
13 Received: from olra.theworths.org ([127.0.0.1])\r
14         by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
15         with ESMTP id Q3paqY7YYbqj for <notmuch@notmuchmail.org>;\r
16         Mon, 16 May 2011 19:10:35 -0700 (PDT)\r
17 Received: from kaylee.flamingspork.com (kaylee.flamingspork.com\r
18         [74.207.245.61])\r
19         by olra.theworths.org (Postfix) with ESMTP id 6CD4C431FB6\r
20         for <notmuch@notmuchmail.org>; Mon, 16 May 2011 19:10:35 -0700 (PDT)\r
21 Received: from willster.flamingspork.com (localhost [127.0.0.1])\r
22         by kaylee.flamingspork.com (Postfix) with ESMTPS id 3AAA7609E\r
23         for <notmuch@notmuchmail.org>; Tue, 17 May 2011 02:10:09 +0000 (UTC)\r
24 Received: by willster.flamingspork.com (Postfix, from userid 1000)\r
25         id C65DF492D5; Tue, 17 May 2011 12:10:32 +1000 (EST)\r
26 From: Stewart Smith <stewart@flamingspork.com>\r
27 To: notmuch <notmuch@notmuchmail.org>\r
28 Subject: [BUG] [PATCH] Fix appending of Received headers\r
29 User-Agent: Notmuch/0.5-93-g5e4ed5b (http://notmuchmail.org) Emacs/23.2.1\r
30         (x86_64-pc-linux-gnu)\r
31 Date: Tue, 17 May 2011 12:10:32 +1000\r
32 Message-ID: <878vu6ulev.fsf@flamingspork.com>\r
33 MIME-Version: 1.0\r
34 Content-Type: text/plain; charset=us-ascii\r
35 X-BeenThere: notmuch@notmuchmail.org\r
36 X-Mailman-Version: 2.1.13\r
37 Precedence: list\r
38 List-Id: "Use and development of the notmuch mail system."\r
39         <notmuch.notmuchmail.org>\r
40 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
41         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
42 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
43 List-Post: <mailto:notmuch@notmuchmail.org>\r
44 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
45 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
46         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
47 X-List-Received-Date: Tue, 17 May 2011 02:10:35 -0000\r
48 \r
49 We're not properly concatenating the Received headers if we parse them\r
50 while requesting a header that isn't Received.\r
51 \r
52 this fixes notmuch-reply address detection in a bunch of situations.\r
53 \r
54 diff --git a/lib/message-file.c b/lib/message-file.c\r
55 index 7722832..dd0f698 100644\r
56 --- a/lib/message-file.c\r
57 +++ b/lib/message-file.c\r
58 @@ -329,7 +329,7 @@ notmuch_message_file_get_header (notmuch_message_file_t *message,\r
59         /* we treat the Received: header special - we want to concat ALL of \r
60          * the Received: headers we encounter.\r
61          * for everything else we return the first instance of a header */\r
62 -       if (is_received) {\r
63 +       if (strcasecmp(header, "received") == 0) {\r
64             if (header_sofar == NULL) {\r
65                 /* first Received: header we encountered; just add it */\r
66                 g_hash_table_insert (message->headers, header, decoded_value);\r
67 \r
68 -- \r
69 Stewart Smith\r