aboutsummaryrefslogtreecommitdiffstats
path: root/camel/camel-mime-part.c
diff options
context:
space:
mode:
authorJeffrey Stedfast <fejj@ximian.com>2001-05-10 04:17:12 +0800
committerJeffrey Stedfast <fejj@src.gnome.org>2001-05-10 04:17:12 +0800
commit3f207278fb889bacbfda7afa3899257d0c29888c (patch)
tree3488e2e0a54756d0358b8e4877828a5b1422e6e2 /camel/camel-mime-part.c
parentd6c788a6b04b945477317837b77de0a107aa1987 (diff)
downloadgsoc2013-evolution-3f207278fb889bacbfda7afa3899257d0c29888c.tar
gsoc2013-evolution-3f207278fb889bacbfda7afa3899257d0c29888c.tar.gz
gsoc2013-evolution-3f207278fb889bacbfda7afa3899257d0c29888c.tar.bz2
gsoc2013-evolution-3f207278fb889bacbfda7afa3899257d0c29888c.tar.lz
gsoc2013-evolution-3f207278fb889bacbfda7afa3899257d0c29888c.tar.xz
gsoc2013-evolution-3f207278fb889bacbfda7afa3899257d0c29888c.tar.zst
gsoc2013-evolution-3f207278fb889bacbfda7afa3899257d0c29888c.zip
Wrap the content-id with <>'s.
2001-05-09 Jeffrey Stedfast <fejj@ximian.com> * camel-mime-part.c (camel_mime_part_set_content_id): Wrap the content-id with <>'s. svn path=/trunk/; revision=9734
Diffstat (limited to 'camel/camel-mime-part.c')
-rw-r--r--camel/camel-mime-part.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/camel/camel-mime-part.c b/camel/camel-mime-part.c
index c8720b2fea..e62f7cce27 100644
--- a/camel/camel-mime-part.c
+++ b/camel/camel-mime-part.c
@@ -371,8 +371,17 @@ camel_mime_part_get_filename (CamelMimePart *mime_part)
void
camel_mime_part_set_content_id (CamelMimePart *mime_part, const char *contentid)
{
- camel_medium_set_header (CAMEL_MEDIUM (mime_part), "Content-ID",
- contentid);
+ char *cid, *id;
+
+ if (contentid)
+ id = g_strstrip (g_strdup (contentid));
+ else
+ id = header_msgid_generate ();
+
+ cid = g_strdup_printf ("<%s>", id);
+ g_free (id);
+ camel_medium_set_header (CAMEL_MEDIUM (mime_part), "Content-ID", cid);
+ g_free (cid);
}
const gchar *