[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    branches/KDE/3.5/kdepim/libkmime
From:       Tom Albers <tomalbers () kde ! nl>
Date:       2006-12-16 14:02:32
Message-ID: 1166277752.723386.28916.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 614146 by toma:

Backport 'safe' part of SVN commit 613265 by vkrause:
 various fixes to handle the multipart example from RFC 2046, section 5.1.1


 M  +1 -1      kmime_content.cpp  
 M  +1 -1      kmime_parsers.cpp  


--- branches/KDE/3.5/kdepim/libkmime/kmime_content.cpp #614145:614146
@@ -345,7 +345,7 @@
   }
   else if(c_ontents && !c_ontents->isEmpty()) { //this is a multipart message
     Headers::ContentType *ct=contentType();
-    QCString boundary="--"+ct->boundary();
+    QCString boundary="\n--"+ct->boundary();
 
     //add all (encoded) contents separated by boundaries
     for(Content *c=c_ontents->first(); c; c=c_ontents->next()) {
--- branches/KDE/3.5/kdepim/libkmime/kmime_parsers.cpp #614145:614146
@@ -72,7 +72,7 @@
         pos2=-1; //break;
       }
       else {
-        part=s_rc.mid(pos1, pos2-pos1);
+        part=s_rc.mid(pos1, pos2-pos1 - 1 ); // pos2 - 1 (\n) is part of the \
boundary (see RFC 2046, section 5.1.1)  p_arts.append(part);
         pos2+=blen; //pos2 points now to the first charakter after the boundary
         if(s_rc[pos2]=='-' && s_rc[pos2+1]=='-') { //end-boundary


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic