diff options
author | Not Zed <NotZed@Ximian.com> | 2002-04-09 21:45:44 +0800 |
---|---|---|
committer | Michael Zucci <zucchi@src.gnome.org> | 2002-04-09 21:45:44 +0800 |
commit | d89f072f8d45dd65ad62188a9e8b5f903ea2faf5 (patch) | |
tree | 76247ba6842f7b4c690244038142f7dc22dc0a0c /camel/camel-mime-part.c | |
parent | b2c4de41b127c433577cc886b54ad0caa9a9787d (diff) | |
download | gsoc2013-evolution-d89f072f8d45dd65ad62188a9e8b5f903ea2faf5.tar.gz gsoc2013-evolution-d89f072f8d45dd65ad62188a9e8b5f903ea2faf5.tar.zst gsoc2013-evolution-d89f072f8d45dd65ad62188a9e8b5f903ea2faf5.zip |
If we get multiple Content-Type header values, change subsequent headers
2002-04-09 Not Zed <NotZed@Ximian.com>
* camel-mime-part.c (construct_from_parser): If we get multiple
Content-Type header values, change subsequent headers to
X-Invalid-Content-Type so it doesn't wreck processing. This fixes
the reported case in #18929, but i dont know if it fixes the
original posters problems.
2002-04-08 Not Zed <NotZed@Ximian.com>
* camel-vtrash-folder.c (vtrash_move_messages_to): If we find
we're moving from the vtrash to another folder, we need to convert
the uid from a vfolder uid to the source uid (+8). Fix for
#20886. Also changed to batch multiple moves to different folders
so they are done as efficiently as possible rather than one at a
time.
* camel-mime-utils.c (base64_decode_step): If we only get passed
'=', we back track only if we actually output any data. Fix for
#21716.
(quoted_decode): Pass out size_t instead of int, and use 0 instead
of -1 for error since its not signed. This will fix similar bug
to above in different circumstances since the result is taken as
unsigned. This is only an internal func.
(quoted_encode): Return size_t just for consistency.
* camel-block-file.c (block_file_validate_root): Comment out the
debug and move it into a warning when the validation fails.
svn path=/trunk/; revision=16394
Diffstat (limited to 'camel/camel-mime-part.c')
-rw-r--r-- | camel/camel-mime-part.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/camel/camel-mime-part.c b/camel/camel-mime-part.c index 614ba186b8..e64fc94927 100644 --- a/camel/camel-mime-part.c +++ b/camel/camel-mime-part.c @@ -249,7 +249,7 @@ process_header(CamelMedium *medium, const char *header_name, const char *header_ g_free (mime_part->content_location); mime_part->content_location = header_location_decode (header_value); break; - case HEADER_CONTENT_TYPE: + case HEADER_CONTENT_TYPE: if (mime_part->content_type) header_content_type_unref (mime_part->content_type); mime_part->content_type = header_content_type_decode (header_value); @@ -785,9 +785,14 @@ construct_from_parser(CamelMimePart *dw, CamelMimeParser *mp) process_header((CamelMedium *)dw, "content-type", content); while (headers) { - camel_medium_add_header((CamelMedium *)dw, headers->name, headers->value); + if (strcasecmp(headers->name, "content-type") == 0 + && headers->value != content) + camel_medium_add_header((CamelMedium *)dw, "X-Invalid-Content-Type", headers->value); + else + camel_medium_add_header((CamelMedium *)dw, headers->name, headers->value); headers = headers->next; } + camel_mime_part_construct_content_from_parser(dw, mp); break; default: |