Re: Missing headers when forwarding html message as RFC822
[notmuch-archives.git] / b5 / 59027b4a3ef9ae3194fb61fc317affab0bf4e6
1 Return-Path: <amdragon@mit.edu>\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 277B1429E49\r
6         for <notmuch@notmuchmail.org>; Thu, 24 Oct 2013 08:19:23 -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.7\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5\r
12         tests=[RCVD_IN_DNSWL_LOW=-0.7] 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 33WI5egioZOz for <notmuch@notmuchmail.org>;\r
16         Thu, 24 Oct 2013 08:19:17 -0700 (PDT)\r
17 Received: from dmz-mailsec-scanner-4.mit.edu (dmz-mailsec-scanner-4.mit.edu\r
18         [18.9.25.15])\r
19         by olra.theworths.org (Postfix) with ESMTP id D0AA1429E39\r
20         for <notmuch@notmuchmail.org>; Thu, 24 Oct 2013 08:19:16 -0700 (PDT)\r
21 X-AuditID: 1209190f-b7fa08e0000009c6-9e-52693a7420bc\r
22 Received: from mailhub-auth-3.mit.edu ( [18.9.21.43])\r
23         by dmz-mailsec-scanner-4.mit.edu (Symantec Messaging Gateway) with SMTP\r
24         id 46.10.02502.47A39625; Thu, 24 Oct 2013 11:19:16 -0400 (EDT)\r
25 Received: from outgoing.mit.edu (outgoing-auth-1.mit.edu [18.9.28.11])\r
26         by mailhub-auth-3.mit.edu (8.13.8/8.9.2) with ESMTP id r9OFJF3C030434; \r
27         Thu, 24 Oct 2013 11:19:15 -0400\r
28 Received: from drake.dyndns.org\r
29         (216-15-114-40.c3-0.arl-ubr1.sbo-arl.ma.cable.rcn.com\r
30         [216.15.114.40]) (authenticated bits=0)\r
31         (User authenticated as amdragon@ATHENA.MIT.EDU)\r
32         by outgoing.mit.edu (8.13.8/8.12.4) with ESMTP id r9OFJCre012907\r
33         (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NOT);\r
34         Thu, 24 Oct 2013 11:19:14 -0400\r
35 Received: from amthrax by drake.dyndns.org with local (Exim 4.77)\r
36         (envelope-from <amdragon@mit.edu>)\r
37         id 1VZMgq-0006dl-Mn; Thu, 24 Oct 2013 11:19:12 -0400\r
38 From: Austin Clements <amdragon@MIT.EDU>\r
39 To: notmuch@notmuchmail.org\r
40 Subject: [PATCH v2 02/11] cli: Separate current and deprecated format version\r
41 Date: Thu, 24 Oct 2013 11:19:02 -0400\r
42 Message-Id: <1382627951-25252-3-git-send-email-amdragon@mit.edu>\r
43 X-Mailer: git-send-email 1.8.4.rc3\r
44 In-Reply-To: <1382627951-25252-1-git-send-email-amdragon@mit.edu>\r
45 References: <1382627951-25252-1-git-send-email-amdragon@mit.edu>\r
46 X-Brightmail-Tracker:\r
47  H4sIAAAAAAAAA+NgFjrGIsWRmVeSWpSXmKPExsUixCmqrVtilRlkcPW8hEXTdGeL1XN5LK7f\r
48         nMnswOyxc9Zddo9b91+zezxbdYs5gDmKyyYlNSezLLVI3y6BK6Nl0Rnmgi98FY2PjjI2MHbz\r
49         dDFyckgImEjsenCSDcIWk7hwbz2QzcUhJLCPUeLunGlQzkZGiR+Tn7JDOHeYJObv/cEI4cxl\r
50         lJjS+RGsn01AQ2Lb/uWMILaIgLTEzruzWUFsZoFoiSOXZ4DVCAv4Sqz/9BashkVAVeLK3kns\r
51         IDavgIPEpnm7WSDuUJJYeGobWC+ngKPEz9fXwOqFgGp+/T7DMoGRfwEjwypG2ZTcKt3cxMyc\r
52         4tRk3eLkxLy81CJdE73czBK91JTSTYzg4JLk38H47aDSIUYBDkYlHl6ND+lBQqyJZcWVuYcY\r
53         JTmYlER575lmBgnxJeWnVGYkFmfEF5XmpBYfYpTgYFYS4Z2mB5TjTUmsrEotyodJSXOwKInz\r
54         3uSwDxISSE8sSc1OTS1ILYLJynBwKEnwdloCNQoWpaanVqRl5pQgpJk4OEGG8wANXwpSw1tc\r
55         kJhbnJkOkT/FqCglzjsPJCEAksgozYPrhUX/K0ZxoFeEeTeBVPEAEwdc9yugwUxAg6csSQMZ\r
56         XJKIkJJqYBTqC7UQWLqB+4gk2+JN4at5pqxMi89axHyPRUzcwSZ3VWMbq+bZtTvmHd52XGi9\r
57         SHY286sznwpuFDRdtJ161nv/Vna5ftGXh++Gp6c2Ts28zlpk/uXHvJVfe7Rz9x+qPKR2eMpZ\r
58         97qElTO8Yuw6t+R9sTFKW3/XctLztfNnad79krv45PkLjluUWIozEg21mIuKEwErz1Ld2QIA        AA==\r
59 X-BeenThere: notmuch@notmuchmail.org\r
60 X-Mailman-Version: 2.1.13\r
61 Precedence: list\r
62 List-Id: "Use and development of the notmuch mail system."\r
63         <notmuch.notmuchmail.org>\r
64 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
65         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
66 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
67 List-Post: <mailto:notmuch@notmuchmail.org>\r
68 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
69 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
70         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
71 X-List-Received-Date: Thu, 24 Oct 2013 15:19:23 -0000\r
72 \r
73 Previously, the CLI would print a deprecation warning if a client\r
74 requested any format version other than the current one.  However, if\r
75 we add fields that are backwards-compatible, but want clients to be\r
76 able to depend on, we need to bump the version, but that doesn't make\r
77 the older version deprecated.\r
78 \r
79 Hence, separate out the "minimum active" version and only print a\r
80 warning for requests below this version number.\r
81 ---\r
82  notmuch-client.h | 6 ++++++\r
83  notmuch.c        | 2 +-\r
84  2 files changed, 7 insertions(+), 1 deletion(-)\r
85 \r
86 diff --git a/notmuch-client.h b/notmuch-client.h\r
87 index 0bfa4da..4ecb3ae 100644\r
88 --- a/notmuch-client.h\r
89 +++ b/notmuch-client.h\r
90 @@ -142,6 +142,12 @@ chomp_newline (char *str)\r
91  /* The minimum supported structured output format version.  Requests\r
92   * for format versions below this will return an error. */\r
93  #define NOTMUCH_FORMAT_MIN 1\r
94 +/* The minimum non-deprecated structured output format version.\r
95 + * Requests for format versions below this will print a stern warning.\r
96 + * Must be between NOTMUCH_FORMAT_MIN and NOTMUCH_FORMAT_CUR,\r
97 + * inclusive.\r
98 + */\r
99 +#define NOTMUCH_FORMAT_MIN_ACTIVE 1\r
100  \r
101  /* The output format version requested by the caller on the command\r
102   * line.  If no format version is requested, this will be set to\r
103 diff --git a/notmuch.c b/notmuch.c\r
104 index 8d303a1..54f46c6 100644\r
105 --- a/notmuch.c\r
106 +++ b/notmuch.c\r
107 @@ -127,7 +127,7 @@ by the notmuch CLI (it requires at least version %d).  You may need to\n\\r
108  upgrade your notmuch front-end.\n",\r
109                  notmuch_format_version, NOTMUCH_FORMAT_MIN);\r
110         exit (NOTMUCH_EXIT_FORMAT_TOO_OLD);\r
111 -    } else if (notmuch_format_version != NOTMUCH_FORMAT_CUR) {\r
112 +    } else if (notmuch_format_version < NOTMUCH_FORMAT_MIN_ACTIVE) {\r
113         /* Warn about old version requests so compatibility issues are\r
114          * less likely when we drop support for a deprecated format\r
115          * versions. */\r
116 -- \r
117 1.8.4.rc3\r
118 \r