You are viewing a plain text version of this content. The canonical link for it is here.
Posted to scm@geronimo.apache.org by ri...@apache.org on 2008/08/26 20:30:41 UTC

svn commit: r689164 - /geronimo/specs/trunk/geronimo-javamail_1.4_spec/src/main/java/javax/mail/internet/MimeMultipart.java

Author: rickmcguire
Date: Tue Aug 26 11:30:40 2008
New Revision: 689164

URL: http://svn.apache.org/viewvc?rev=689164&view=rev
Log:
GERONIMO-4260 Multipart message from POP3 has spurious attachment


Modified:
    geronimo/specs/trunk/geronimo-javamail_1.4_spec/src/main/java/javax/mail/internet/MimeMultipart.java

Modified: geronimo/specs/trunk/geronimo-javamail_1.4_spec/src/main/java/javax/mail/internet/MimeMultipart.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-javamail_1.4_spec/src/main/java/javax/mail/internet/MimeMultipart.java?rev=689164&r1=689163&r2=689164&view=diff
==============================================================================
--- geronimo/specs/trunk/geronimo-javamail_1.4_spec/src/main/java/javax/mail/internet/MimeMultipart.java (original)
+++ geronimo/specs/trunk/geronimo-javamail_1.4_spec/src/main/java/javax/mail/internet/MimeMultipart.java Tue Aug 26 11:30:40 2008
@@ -200,6 +200,10 @@
                     }
                     complete = false;
                 }
+                // if we hit the final boundary, stop processing this 
+                if (partStream.finalBoundaryFound) {
+                    break; 
+                }
             }
         } catch (Exception e){
             throw new MessagingException(e.toString(),e);
@@ -360,6 +364,7 @@
         PushbackInputStream inStream;
         public boolean boundaryFound = false;
         byte[] boundary;
+        public boolean finalBoundaryFound = false; 
 
         public MimeBodyPartInputStream(PushbackInputStream inStream, byte[] boundary) {
             super();
@@ -549,6 +554,8 @@
                         }
                     }
                 }
+                // we've hit the end of times...
+                finalBoundaryFound = true; 
             }
             else {
                 // now check for a linend sequence...either \r\n or \n is accepted.