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