[gmime] Do not treat parsing individual mime parts as top-level mime parts of a message



commit 8616d8674b1a4733cbb7f068b6ce1284db0bb77e
Author: Jeffrey Stedfast <jeff xamarin com>
Date:   Thu Jul 14 07:09:23 2016 -0400

    Do not treat parsing individual mime parts as top-level mime parts of a message
    
    2016-07-14  Jeffrey Stedfast  <fejj gnome org>
    
        * gmime/gmime-parser.c (parser_construct_part): When parsing individual
        mime parts, do not treat them as top-level mime parts of a message.
    
        When decrypting mime parts, for example, we need all headers of the
        decrypted mime part to be included in the GMimeObject returned,
        otherwise we end up losing data.

 ChangeLog            |    9 +++++++++
 gmime/gmime-parser.c |    4 ++--
 2 files changed, 11 insertions(+), 2 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 2038fc7..70bd761 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2016-07-14  Jeffrey Stedfast  <fejj gnome org>
+
+       * gmime/gmime-parser.c (parser_construct_part): When parsing individual
+       mime parts, do not treat them as top-level mime parts of a message.
+
+       When decrypting mime parts, for example, we need all headers of the
+       decrypted mime part to be included in the GMimeObject returned,
+       otherwise we end up losing data.
+
 2016-03-03  Jeffrey Stedfast  <fejj gnome org>
 
        * gmime/gmime-utils.c (header_fold_tokens): Fixed folding logic to add a
diff --git a/gmime/gmime-parser.c b/gmime/gmime-parser.c
index 9566745..2cff709 100644
--- a/gmime/gmime-parser.c
+++ b/gmime/gmime-parser.c
@@ -1933,9 +1933,9 @@ parser_construct_part (GMimeParser *parser)
        
        content_type = parser_content_type (parser, NULL);
        if (content_type_is_type (content_type, "multipart", "*"))
-               object = parser_construct_multipart (parser, content_type, TRUE, &found);
+               object = parser_construct_multipart (parser, content_type, FALSE, &found);
        else
-               object = parser_construct_leaf_part (parser, content_type, TRUE, &found);
+               object = parser_construct_leaf_part (parser, content_type, FALSE, &found);
        
        content_type_destroy (content_type);
        


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]