diff options
author | Jeffrey Stedfast <fejj@ximian.com> | 2002-02-23 06:37:09 +0800 |
---|---|---|
committer | Jeffrey Stedfast <fejj@src.gnome.org> | 2002-02-23 06:37:09 +0800 |
commit | c1fa893c2a1a671cdcd84daf5ca1d0ff9fd233f4 (patch) | |
tree | aa49e455a6b1177c2fe69e6fffa35fd1442154f3 /camel | |
parent | 54c650eaea9a5a74a78e88e0e9e0b98f0719c723 (diff) | |
download | gsoc2013-evolution-c1fa893c2a1a671cdcd84daf5ca1d0ff9fd233f4.tar.gz gsoc2013-evolution-c1fa893c2a1a671cdcd84daf5ca1d0ff9fd233f4.tar.zst gsoc2013-evolution-c1fa893c2a1a671cdcd84daf5ca1d0ff9fd233f4.zip |
Set the 'name' parameter on the Content-Type too. Fixes bug #20779.
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.
svn path=/trunk/; revision=15805
Diffstat (limited to 'camel')
-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 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 * |