From: David Levine Date: Sat, 16 Feb 2013 14:27:29 +0000 (-0600) Subject: When output_content() outputs a non-MIME message with no body, X-Git-Url: https://diplodocus.org/git/nmh/commitdiff_plain/84932d0a96c79bfb2f0384ebab806dc51a35f600?ds=sidebyside;hp=b15948e6710cd1d7cc29b661591ac18c2de4cbd2 When output_content() outputs a non-MIME message with no body, suppress the newline after the headers. --- diff --git a/uip/mhoutsbr.c b/uip/mhoutsbr.c index aac061dd..1064b15e 100644 --- a/uip/mhoutsbr.c +++ b/uip/mhoutsbr.c @@ -161,7 +161,14 @@ output_content (CT ct, FILE *out) default: switch (ct->c_encoding) { case CE_7BIT: - putc ('\n', out); + /* Special case: if this is a non-MIME message with no + body, don't emit the newline that would appear between + the headers and body. In that case, the call to + write8Bit() shouldn't be needed, but is harmless. */ + if (ct->c_ctinfo.ci_attrs[0] != NULL || + ct->c_begin != ct->c_end) { + putc ('\n', out); + } result = write8Bit (ct, out); break;