]> diplodocus.org Git - nmh/commitdiff
When output_content() outputs a non-MIME message with no body,
authorDavid Levine <levinedl@acm.org>
Sat, 16 Feb 2013 14:27:29 +0000 (08:27 -0600)
committerDavid Levine <levinedl@acm.org>
Sat, 16 Feb 2013 14:27:29 +0000 (08:27 -0600)
suppress the newline after the headers.

uip/mhoutsbr.c

index aac061dd2a4f218ef1851d86cb5710cb420a7b1a..1064b15e50739e7aa21788fc51668c4f35bb8455 100644 (file)
@@ -161,7 +161,14 @@ output_content (CT ct, FILE *out)
     default:
        switch (ct->c_encoding) {
        case CE_7BIT:
     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;
 
            result = write8Bit (ct, out);
            break;