aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhiro <hiro@ee746299-78ed-0310-b773-934348b2243d>2010-07-13 04:59:56 +0000
committerhiro <hiro@ee746299-78ed-0310-b773-934348b2243d>2010-07-13 04:59:56 +0000
commit06270b26184b5a7a292a7475bb53d82c3295bdcb (patch)
tree06cd4f9839ccf8132617a892b12ab5cec509b004
parent0ea184b3da8bcf2e614fb09af789f0b847e123a9 (diff)
fully implemented RFC 2046.
git-svn-id: svn://sylpheed.sraoss.jp/sylpheed/trunk@2610 ee746299-78ed-0310-b773-934348b2243d
-rw-r--r--ChangeLog5
-rw-r--r--libsylph/procmsg.c29
2 files changed, 34 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 6df1f506..1cc84bd7 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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);