From bc8b0ad9df8e8cd919b993b38a51fa114497300a Mon Sep 17 00:00:00 2001 From: Jeffrey Stedfast Date: Thu, 17 Mar 2005 18:59:40 +0000 Subject: Don't show multiple "Mailer" headers even if multiple 2005-03-16 Jeffrey Stedfast * em-format-html.c (efh_format_headers): Don't show multiple "Mailer" headers even if multiple x-mailer/user-agent/whatever headers exist. Fixes bug #70394. svn path=/trunk/; revision=29052 --- mail/ChangeLog | 7 +++++++ mail/em-format-html.c | 5 ++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/mail/ChangeLog b/mail/ChangeLog index 28917e7f64..aaee376408 100644 --- a/mail/ChangeLog +++ b/mail/ChangeLog @@ -1,3 +1,9 @@ +2005-03-16 Jeffrey Stedfast + + * em-format-html.c (efh_format_headers): Don't show multiple + "Mailer" headers even if multiple x-mailer/user-agent/whatever + headers exist. Fixes bug #70394. + 2005-03-16 Not Zed ** See bug #73363 @@ -29,6 +35,7 @@ * em-format-hook.c (emfh_format_format): if we are disabled, don't invoke handler, try to invoke old handler if there was one. +>>>>>>> 1.3608 2005-03-10 Not Zed ** See bug #73293 diff --git a/mail/em-format-html.c b/mail/em-format-html.c index 9126bdd337..3125e32b4e 100644 --- a/mail/em-format-html.c +++ b/mail/em-format-html.c @@ -1639,6 +1639,8 @@ efh_format_headers(EMFormatHTML *efh, CamelStream *stream, CamelMedium *part) header = header->next; } } else { + int mailer_shown = FALSE; + while (h->next) { int mailer; @@ -1646,13 +1648,14 @@ efh_format_headers(EMFormatHTML *efh, CamelStream *stream, CamelMedium *part) mailer = !g_ascii_strcasecmp (h->name, "X-Evolution-Mailer"); while (header) { - if (mailer && (!g_ascii_strcasecmp (header->name, "X-Mailer") || + if (!mailer_shown && mailer && (!g_ascii_strcasecmp (header->name, "X-Mailer") || !g_ascii_strcasecmp (header->name, "User-Agent") || !g_ascii_strcasecmp (header->name, "X-Newsreader"))) { struct _camel_header_raw xmailer; xmailer.name = "X-Evolution-Mailer"; xmailer.value = header->value; + mailer_shown = TRUE; efh_format_header (emf, stream, part, &xmailer, h->flags, charset); if (strstr(header->value, "Evolution")) -- cgit v1.2.3