From d47168b1771732a05e9538064da1cb788120ee41 Mon Sep 17 00:00:00 2001 From: David Levine Date: Sun, 21 Dec 2014 19:41:12 -0600 Subject: [PATCH] In expand_pseudoheader(), set Content-Type to 7-bit for ASCII text. --- uip/mhbuildsbr.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/uip/mhbuildsbr.c b/uip/mhbuildsbr.c index 9cc56351..7984b7d3 100644 --- a/uip/mhbuildsbr.c +++ b/uip/mhbuildsbr.c @@ -2283,10 +2283,10 @@ expand_pseudoheader (CT ct, CT *text_plain_ct, struct multipart *m, } else { set_charset (reply_ct, -1); charset = get_param (reply_ct->c_ctinfo.ci_first_pm, "charset", '?', 1); - if (reply_ct->c_reqencoding == CE_UNKNOWN && - strcasecmp (charset, "US-ASCII")) { + if (reply_ct->c_reqencoding == CE_UNKNOWN) { /* Assume that 8bit is sufficient (for text). */ - reply_ct->c_reqencoding = CE_8BIT; + reply_ct->c_reqencoding = + strcasecmp (charset, "US-ASCII") ? CE_8BIT : CE_7BIT; } } @@ -2299,10 +2299,10 @@ expand_pseudoheader (CT ct, CT *text_plain_ct, struct multipart *m, /* Make sure that the charset is set in the text/plain part. */ set_charset (*text_plain_ct, -1); - if ((*text_plain_ct)->c_reqencoding == CE_UNKNOWN && - strcasecmp (charset, "US-ASCII")) { + if ((*text_plain_ct)->c_reqencoding == CE_UNKNOWN) { /* Assume that 8bit is sufficient (for text). */ - (*text_plain_ct)->c_reqencoding = CE_8BIT; + (*text_plain_ct)->c_reqencoding = + strcasecmp (charset, "US-ASCII") ? CE_8BIT : CE_7BIT; } } -- 2.56.0