[PATCH 3/6] reply: Document the reason for g_mime_filter_headers
authorAustin Clements <amdragon@MIT.EDU>
Mon, 12 Aug 2013 18:40:36 +0000 (14:40 +2000)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:56:16 +0000 (09:56 -0800)
2c/377b277f0fe13252e5bae6fc0d98ba23ff6c87 [new file with mode: 0644]

diff --git a/2c/377b277f0fe13252e5bae6fc0d98ba23ff6c87 b/2c/377b277f0fe13252e5bae6fc0d98ba23ff6c87
new file mode 100644 (file)
index 0000000..1ed3033
--- /dev/null
@@ -0,0 +1,95 @@
+Return-Path: <amdragon@mit.edu>\r
+X-Original-To: notmuch@notmuchmail.org\r
+Delivered-To: notmuch@notmuchmail.org\r
+Received: from localhost (localhost [127.0.0.1])\r
+       by olra.theworths.org (Postfix) with ESMTP id 074C5431FAE\r
+       for <notmuch@notmuchmail.org>; Mon, 12 Aug 2013 11:41:04 -0700 (PDT)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: -0.7\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5\r
+       tests=[RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled\r
+Received: from olra.theworths.org ([127.0.0.1])\r
+       by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
+       with ESMTP id k1cv8ope-+04 for <notmuch@notmuchmail.org>;\r
+       Mon, 12 Aug 2013 11:40:59 -0700 (PDT)\r
+Received: from dmz-mailsec-scanner-7.mit.edu (dmz-mailsec-scanner-7.mit.edu\r
+       [18.7.68.36])\r
+       by olra.theworths.org (Postfix) with ESMTP id 7D36A431FBD\r
+       for <notmuch@notmuchmail.org>; Mon, 12 Aug 2013 11:40:53 -0700 (PDT)\r
+X-AuditID: 12074424-b7f228e00000096b-3b-52092c351ae2\r
+Received: from mailhub-auth-2.mit.edu ( [18.7.62.36])\r
+       by dmz-mailsec-scanner-7.mit.edu (Symantec Messaging Gateway) with SMTP\r
+       id DD.56.02411.53C29025; Mon, 12 Aug 2013 14:40:53 -0400 (EDT)\r
+Received: from outgoing.mit.edu (outgoing-auth-1.mit.edu [18.9.28.11])\r
+       by mailhub-auth-2.mit.edu (8.13.8/8.9.2) with ESMTP id r7CIeotm011668; \r
+       Mon, 12 Aug 2013 14:40:51 -0400\r
+Received: from drake.dyndns.org (26-4-172.dynamic.csail.mit.edu [18.26.4.172])\r
+       (authenticated bits=0)\r
+       (User authenticated as amdragon@ATHENA.MIT.EDU)\r
+       by outgoing.mit.edu (8.13.8/8.12.4) with ESMTP id r7CIemX8003746\r
+       (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NOT);\r
+       Mon, 12 Aug 2013 14:40:50 -0400\r
+Received: from amthrax by drake.dyndns.org with local (Exim 4.77)\r
+       (envelope-from <amdragon@mit.edu>)\r
+       id 1V8x2u-0005ya-Ll; Mon, 12 Aug 2013 14:40:48 -0400\r
+From: Austin Clements <amdragon@MIT.EDU>\r
+To: notmuch@notmuchmail.org\r
+Subject: [PATCH 3/6] reply: Document the reason for g_mime_filter_headers\r
+Date: Mon, 12 Aug 2013 14:40:36 -0400\r
+Message-Id: <1376332839-22825-4-git-send-email-amdragon@mit.edu>\r
+X-Mailer: git-send-email 1.7.10.4\r
+In-Reply-To: <1376332839-22825-1-git-send-email-amdragon@mit.edu>\r
+References: <1376332839-22825-1-git-send-email-amdragon@mit.edu>\r
+X-Brightmail-Tracker:\r
+ H4sIAAAAAAAAA+NgFtrIIsWRmVeSWpSXmKPExsUixG6nomuqwxlk8O4Qh8X1mzOZHRg9nq26\r
+       xRzAGMVlk5Kak1mWWqRvl8CVsXyZVsEu9orfdx4xNjAuYOti5OSQEDCRaJi9nxXCFpO4cG89\r
+       UJyLQ0hgH6PEieW/WCGcjYwSz0/Pg8ocYZL4sm4HC4Qzl1HibuNUdpB+NgENiW37lzOC2CIC\r
+       0hI7784GaufgYBZQk/jTpQJiCgt4SkztUAKpYBFQldi9/zcLiM0r4CDxeCZEp4SAokT3swlg\r
+       13EKOErcX34OrEYIqGbjrh7GCYz8CxgZVjHKpuRW6eYmZuYUpybrFicn5uWlFuma6+Vmluil\r
+       ppRuYgSHjIvKDsbmQ0qHGAU4GJV4eDM/cgQJsSaWFVfmHmKU5GBSEuWdpMkZJMSXlJ9SmZFY\r
+       nBFfVJqTWnyIUYKDWUmEdwsrUI43JbGyKrUoHyYlzcGiJM777OnZQCGB9MSS1OzU1ILUIpis\r
+       DAeHkgRvqDZQo2BRanpqRVpmTglCmomDE2Q4D9DwZpAa3uKCxNzizHSI/ClGRSlx3hSQhABI\r
+       IqM0D64XFtOvGMWBXhHm7QSp4gGmA7juV0CDmYAGGzVzgAwuSURISTUwVtklLdio/qKuNuC2\r
+       4p7CqB+POjS89zDtaYnirwo+NfOazUNZr6qKHX9klCK2TPwuyMXKPMPv44YEtcnqf2d1m22u\r
+       lGp/eXeh2ORYVd0LddkT7s0+9XHe5gSp1xmSWa4FCvZdt36tMYzSe/S+wGValMe555rlUd2F\r
+       RnM3BEltqWf6X3JKwX+OEktxRqKhFnNRcSIAQmwdtMQCAAA=\r
+X-BeenThere: notmuch@notmuchmail.org\r
+X-Mailman-Version: 2.1.13\r
+Precedence: list\r
+List-Id: "Use and development of the notmuch mail system."\r
+       <notmuch.notmuchmail.org>\r
+List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
+       <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
+List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
+List-Post: <mailto:notmuch@notmuchmail.org>\r
+List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
+List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
+       <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
+X-List-Received-Date: Mon, 12 Aug 2013 18:41:04 -0000\r
+\r
+Given how long it took me to figure out why we pass the reply headers\r
+through g_mime_filter_headers, it's worth a comment.\r
+---\r
+ notmuch-reply.c |    4 ++++\r
+ 1 file changed, 4 insertions(+)\r
+\r
+diff --git a/notmuch-reply.c b/notmuch-reply.c\r
+index e151f78..3b2b58d 100644\r
+--- a/notmuch-reply.c\r
++++ b/notmuch-reply.c\r
+@@ -34,6 +34,10 @@ show_reply_headers (GMimeMessage *message)\r
+       g_mime_stream_file_set_owner (GMIME_STREAM_FILE (stream_stdout), FALSE);\r
+       stream_filter = g_mime_stream_filter_new(stream_stdout);\r
+       if (stream_filter) {\r
++              // g_mime_object_write_to_stream will produce\r
++              // RFC2047-encoded headers, but we want to present the\r
++              // user with decoded headers and let whatever\r
++              // ultimately sends the mail do the RFC2047 encoding.\r
+               g_mime_stream_filter_add(GMIME_STREAM_FILTER(stream_filter),\r
+                                        g_mime_filter_headers_new());\r
+               g_mime_object_write_to_stream(GMIME_OBJECT(message), stream_filter);\r
+-- \r
+1.7.10.4\r
+\r