summaryrefslogtreecommitdiffstats
path: root/mailnews/mime/src/mimemsg.cpp
diff options
context:
space:
mode:
authorMatt A. Tobin <email@mattatobin.com>2019-11-11 01:56:34 -0500
committerMatt A. Tobin <email@mattatobin.com>2019-11-11 01:56:34 -0500
commit73e14fb7049306439a5637ff261f1370a94518e5 (patch)
treef9ef6c4782b0849bae1927f2c1ab9bbd8d97aa4d /mailnews/mime/src/mimemsg.cpp
parentdc77b707f20280cd057368ca11fafc2c0bfc9414 (diff)
downloadUXP-73e14fb7049306439a5637ff261f1370a94518e5.tar
UXP-73e14fb7049306439a5637ff261f1370a94518e5.tar.gz
UXP-73e14fb7049306439a5637ff261f1370a94518e5.tar.lz
UXP-73e14fb7049306439a5637ff261f1370a94518e5.tar.xz
UXP-73e14fb7049306439a5637ff261f1370a94518e5.zip
Bug 1240290
Tag #1273
Diffstat (limited to 'mailnews/mime/src/mimemsg.cpp')
-rw-r--r--mailnews/mime/src/mimemsg.cpp42
1 files changed, 15 insertions, 27 deletions
diff --git a/mailnews/mime/src/mimemsg.cpp b/mailnews/mime/src/mimemsg.cpp
index 2d6957069..d024a7725 100644
--- a/mailnews/mime/src/mimemsg.cpp
+++ b/mailnews/mime/src/mimemsg.cpp
@@ -786,34 +786,22 @@ MimeMessage_write_headers_html (MimeObject *obj)
return status;
}
- if (!msg->crypto_stamped_p)
- {
- /* If we're not writing a xlation stamp, and this is the outermost
- message, then now is the time to run the post_header_html_fn.
- (Otherwise, it will be run when the xlation-stamp is finally
- closed off, in MimeXlateed_emit_buffered_child() or
- MimeMultipartSigned_emit_child().)
- */
- if (obj->options &&
- obj->options->state &&
+ // If this is the outermost message, then now is the time to run the
+ // post_header_html_fn.
+ if (obj->options && obj->options->state &&
obj->options->generate_post_header_html_fn &&
- !obj->options->state->post_header_html_run_p)
- {
- char *html = 0;
- PR_ASSERT(obj->options->state->first_data_written_p);
- html = obj->options->generate_post_header_html_fn(NULL,
- obj->options->html_closure,
- msg->hdrs);
- obj->options->state->post_header_html_run_p = true;
- if (html)
- {
- status = MimeObject_write(obj, html, strlen(html), false);
- PR_Free(html);
- if (status < 0)
- {
- mimeEmitterEndHeader(obj->options, obj);
- return status;
- }
+ !obj->options->state->post_header_html_run_p) {
+ char *html = 0;
+ PR_ASSERT(obj->options->state->first_data_written_p);
+ html = obj->options->generate_post_header_html_fn(
+ NULL, obj->options->html_closure, msg->hdrs);
+ obj->options->state->post_header_html_run_p = true;
+ if (html) {
+ status = MimeObject_write(obj, html, strlen(html), false);
+ PR_Free(html);
+ if (status < 0) {
+ mimeEmitterEndHeader(obj->options, obj);
+ return status;
}
}
}