Update of /cvsroot/mahogany/M/src/mail
In directory sc8-pr-cvs1:/tmp/cvs-serv3260/src/mail

Modified Files:
        MimePartCC.cpp 
Log Message:
fixed yet another bug in parsing complex MIME messages

Index: MimePartCC.cpp
===================================================================
RCS file: /cvsroot/mahogany/M/src/mail/MimePartCC.cpp,v
retrieving revision 1.8
retrieving revision 1.9
diff -b -u -2 -r1.8 -r1.9
--- MimePartCC.cpp      16 Feb 2003 01:19:10 -0000      1.8
+++ MimePartCC.cpp      12 Jul 2003 20:43:29 -0000      1.9
@@ -136,24 +136,10 @@
    /*
       Nasty hack: c-client (and so probably IMAP as well) doesn't seem to
-      number the multipart parts whose parent and grand parent are multipart
-      as well and this part is the only part at this level
+      number the multipart parts whose parent part is the message, so when
+      assigning the part spec to their children we should skip the parent and
+      use the grandparent spec as the base.
 
-      For example, the part numbers are assigned like this in this example
-      message:
-
-         MULTIPART/MIXED
-            TEXT/PLAIN                          1
-            MESSAGE/RFC822                      2
-               MULTIPART/MIXED                  2.1
-                  MULTIPART/ALTERNATIVE
-                     TEXT/PLAIN                 2.1.1
-                     TEXT/HTML                  2.1.2
-                  MESSAGE/RFC822                2.2
-                     MULTIPART/MIXED
-                        TEXT/PLAIN              2.2.1
-                        IMAGE/JPEG              2.2.2
-
-      I.e. the MULTIPART/ALTERNATIVE and the last MIXED parts don't have the
-      part numbers (or rather have the same number as their parent).
+      I'd like to really understand the rule to be used here one of these
+      days...
     */
    if ( m_parent && m_parent->GetParent() )
@@ -172,9 +158,5 @@
             mt = grandparent->GetType().GetPrimary();
 
-            if ( mt == MimeType::MESSAGE ||
-                 ( ( mt == MimeType::MULTIPART ) &&
-                   ( String(m_parent->m_body->subtype) == _T("ALTERNATIVE") )
-                 )
-               )
+            if ( mt == MimeType::MESSAGE )
             {
                // our parent part doesn't have its own part number, use the



-------------------------------------------------------
This SF.Net email sponsored by: Parasoft
Error proof Web apps, automate testing & more.
Download & eval WebKing and get a free book.
www.parasoft.com/bulletproofapps1
_______________________________________________
Mahogany-cvsupdates mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/mahogany-cvsupdates

Reply via email to