diff options
author | Jeffrey Stedfast <fejj@ximian.com> | 2002-03-13 21:54:32 +0000 |
---|---|---|
committer | Jeffrey Stedfast <fejj@src.gnome.org> | 2002-03-13 21:54:32 +0000 |
commit | 54fcf246ab510e67674abb779d8ee3642b6d3682 (patch) | |
tree | 8eb73cb0f7c367a1c74bd5547b09bb39c2fa0206 | |
parent | 5d082ef08c8cc5cceda2f1682554d30aa7847484 (diff) | |
download | evolution-data-server-54fcf246ab510e67674abb779d8ee3642b6d3682.tar.gz |
Set the 'name' parameter on the Content-Type too. Fixes bug #20779.EVOLUTION_1_0_3
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.
-rw-r--r-- | camel/ChangeLog | 5 | ||||
-rw-r--r-- | camel/camel-mime-part.c | 6 |
2 files changed, 11 insertions, 0 deletions
diff --git a/camel/ChangeLog b/camel/ChangeLog index 42a06ec2a..bc861ccd1 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-03-13 Ettore Perazzoli <ettore@ximian.com> [Unfix #21655.] diff --git a/camel/camel-mime-part.c b/camel/camel-mime-part.c index 303fba6c7..320efcf52 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 * |