aboutsummaryrefslogtreecommitdiff
path: root/notmuch-show.c
diff options
context:
space:
mode:
authorDaniel Kahn Gillmor <dkg@fifthhorseman.net>2019-05-26 18:15:54 -0400
committerDavid Bremner <david@tethera.net>2019-05-29 08:02:32 -0300
commit80728a95e6fd8bd1c4a4f8dd8040984ab5c4b04a (patch)
treeeee3efe8666d9f1ed95f44ae922a69b1c8838f1a /notmuch-show.c
parent467859c75932473558080222356c9c0c6f473332 (diff)
cli/show: emit headers after emitting body
This paves the way for emitting protected headers after verification and decryption, because it means that the headers will only be emitted after the body has been parsed. Signed-off-by: Daniel Kahn Gillmor <dkg@fifthhorseman.net>
Diffstat (limited to 'notmuch-show.c')
-rw-r--r--notmuch-show.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/notmuch-show.c b/notmuch-show.c
index c6a7a10a..0816a5e1 100644
--- a/notmuch-show.c
+++ b/notmuch-show.c
@@ -619,9 +619,6 @@ format_part_sprinter (const void *ctx, sprinter_t *sp, mime_node_t *node,
sp->begin_map (sp);
format_message_sprinter (sp, node->envelope_file);
- sp->map_key (sp, "headers");
- format_headers_sprinter (sp, GMIME_MESSAGE (node->part), false);
-
if (output_body) {
sp->map_key (sp, "body");
sp->begin_list (sp);
@@ -657,6 +654,9 @@ format_part_sprinter (const void *ctx, sprinter_t *sp, mime_node_t *node,
sp->end (sp);
}
+ sp->map_key (sp, "headers");
+ format_headers_sprinter (sp, GMIME_MESSAGE (node->part), false);
+
sp->end (sp);
return;
}