diff options
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | libsylph/procmsg.c | 29 |
2 files changed, 34 insertions, 0 deletions
@@ -1,5 +1,10 @@ 2010-07-13 + * libsylph/procmsg.c: procmsg_concat_partial_messages(): fully + implemented RFC 2046. + +2010-07-13 + * libsylph/procmsg.c libsylph/procmime.c: allow Content-Type without total parameter. diff --git a/libsylph/procmsg.c b/libsylph/procmsg.c index f1e88b08..b8f3af16 100644 --- a/libsylph/procmsg.c +++ b/libsylph/procmsg.c @@ -1842,6 +1842,35 @@ skip: return -1; } + /* write out first headers */ + if (i == 0) { + rewind(fp); + while (procheader_get_one_field(buf, sizeof(buf), fp, NULL) != -1) { + if (!g_ascii_strncasecmp(buf, "Content-", 8) || + !g_ascii_strncasecmp(buf, "Subject", 7) || + !g_ascii_strncasecmp(buf, "Message-ID", 10) || + !g_ascii_strncasecmp(buf, "Encrypted", 9) || + !g_ascii_strncasecmp(buf, "MIME-Version", 12)) + continue; + fputs(buf, tmp_fp); + fputs("\n", tmp_fp); + } + + while (procheader_get_one_field(buf, sizeof(buf), fp, NULL) != -1) { + if (!g_ascii_strncasecmp(buf, "Content-", 8) || + !g_ascii_strncasecmp(buf, "Subject", 7) || + !g_ascii_strncasecmp(buf, "Message-ID", 10) || + !g_ascii_strncasecmp(buf, "Encrypted", 9) || + !g_ascii_strncasecmp(buf, "MIME-Version", 12)) { + fputs(buf, tmp_fp); + fputs("\n", tmp_fp); + } + } + + /* header-body separator */ + fputs("\n", tmp_fp); + } + out_size = get_left_file_size(fp); if (out_size < 0) { g_warning("cannot tell left file size of part %d\n", i + 1); |