aboutsummaryrefslogtreecommitdiffstats
path: root/camel
diff options
context:
space:
mode:
Diffstat (limited to 'camel')
-rw-r--r--camel/ChangeLog5
-rw-r--r--camel/camel-mime-part.c6
2 files changed, 11 insertions, 0 deletions
diff --git a/camel/ChangeLog b/camel/ChangeLog
index e90a43f046..3e225e7ce3 100644
--- a/camel/ChangeLog
+++ b/camel/ChangeLog
@@ -1,3 +1,8 @@
+2002-02-22 Jeffrey Stedfast <fejj@ximian.com>
+
+ * camel-mime-part.c (camel_mime_part_set_filename): Set the 'name'
+ parameter on the Content-Type too. Fixes bug #20779.
+
2002-02-14 Jeffrey Stedfast <fejj@ximian.com>
* camel-pgp-context.c (pgp_sign): Pass --always-trust to gpg
diff --git a/camel/camel-mime-part.c b/camel/camel-mime-part.c
index 9a0f1b83eb..f4b307160d 100644
--- a/camel/camel-mime-part.c
+++ b/camel/camel-mime-part.c
@@ -386,6 +386,7 @@ void
camel_mime_part_set_filename (CamelMimePart *mime_part, const gchar *filename)
{
char *str;
+
if (mime_part->disposition == NULL)
mime_part->disposition = header_disposition_decode("attachment");
@@ -395,6 +396,11 @@ camel_mime_part_set_filename (CamelMimePart *mime_part, const gchar *filename)
camel_medium_set_header (CAMEL_MEDIUM (mime_part),
"Content-Disposition", str);
g_free(str);
+
+ header_content_type_set_param (mime_part->content_type, "name", filename);
+ str = header_content_type_format (mime_part->content_type);
+ camel_medium_set_header (CAMEL_MEDIUM (mime_part), "Content-Type", str);
+ g_free (str);
}
const gchar *