aboutsummaryrefslogtreecommitdiffstats
path: root/camel
diff options
context:
space:
mode:
authorDan Winship <danw@src.gnome.org>2000-07-26 01:59:07 +0800
committerDan Winship <danw@src.gnome.org>2000-07-26 01:59:07 +0800
commitdffee3727463f7b84cd97f650cc3adc1b36aa81d (patch)
treeb6bc5a203e589f4ec2690c49862bfd9bc2857e37 /camel
parent55499dc0155c1fee40539cd23774453cb3d5cb1d (diff)
downloadgsoc2013-evolution-dffee3727463f7b84cd97f650cc3adc1b36aa81d.tar
gsoc2013-evolution-dffee3727463f7b84cd97f650cc3adc1b36aa81d.tar.gz
gsoc2013-evolution-dffee3727463f7b84cd97f650cc3adc1b36aa81d.tar.bz2
gsoc2013-evolution-dffee3727463f7b84cd97f650cc3adc1b36aa81d.tar.lz
gsoc2013-evolution-dffee3727463f7b84cd97f650cc3adc1b36aa81d.tar.xz
gsoc2013-evolution-dffee3727463f7b84cd97f650cc3adc1b36aa81d.tar.zst
gsoc2013-evolution-dffee3727463f7b84cd97f650cc3adc1b36aa81d.zip
Don't add a Mime-Version header to a message that already has one.
* camel-mime-message.c (write_to_stream): Don't add a Mime-Version header to a message that already has one. * camel-internet-address.c (internet_encode): Don't put <>s around addresses with no name part. svn path=/trunk/; revision=4318
Diffstat (limited to 'camel')
-rw-r--r--camel/ChangeLog8
-rw-r--r--camel/camel-internet-address.c8
-rw-r--r--camel/camel-mime-message.c3
3 files changed, 14 insertions, 5 deletions
diff --git a/camel/ChangeLog b/camel/ChangeLog
index 33c5b6714a..4e54f475db 100644
--- a/camel/ChangeLog
+++ b/camel/ChangeLog
@@ -1,3 +1,11 @@
+2000-07-25 Dan Winship <danw@helixcode.com>
+
+ * camel-mime-message.c (write_to_stream): Don't add a Mime-Version
+ header to a message that already has one.
+
+ * camel-internet-address.c (internet_encode): Don't put <>s around
+ addresses with no name part.
+
2000-07-25 Peter Williams <peterw@helixcode.com>
* providers/imap/camel-imap-folder.c (imap_expunge): Set
diff --git a/camel/camel-internet-address.c b/camel/camel-internet-address.c
index 003cae5b48..9abbc8c632 100644
--- a/camel/camel-internet-address.c
+++ b/camel/camel-internet-address.c
@@ -129,11 +129,11 @@ static char * internet_encode (CamelAddress *a)
if (i!=0)
g_string_append(out, ", ");
- if (name) {
- g_string_sprintfa(out, "%s ", name);
+ if (name && *name) {
+ g_string_sprintfa(out, "%s <%s>", name, addr->address);
g_free(name);
- }
- g_string_sprintfa(out, "<%s>", addr->address);
+ } else
+ g_string_sprintfa(out, "%s", addr->address);
}
ret = out->str;
g_string_free(out, FALSE);
diff --git a/camel/camel-mime-message.c b/camel/camel-mime-message.c
index 1a31fc1ea1..e511fece7a 100644
--- a/camel/camel-mime-message.c
+++ b/camel/camel-mime-message.c
@@ -445,7 +445,8 @@ write_to_stream (CamelDataWrapper *data_wrapper, CamelStream *stream)
/* FIXME: "To" header needs to be set explicitly as well ... */
- camel_medium_set_header((CamelMedium *)mm, "Mime-Version", "1.0");
+ if (!camel_medium_get_header ((CamelMedium *)mm, "Mime-Version"))
+ camel_medium_set_header((CamelMedium *)mm, "Mime-Version", "1.0");
return CAMEL_DATA_WRAPPER_CLASS (parent_class)->write_to_stream (data_wrapper, stream);
}