geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rickmcgu...@apache.org
Subject svn commit: r689164 - /geronimo/specs/trunk/geronimo-javamail_1.4_spec/src/main/java/javax/mail/internet/MimeMultipart.java
Date Tue, 26 Aug 2008 18:30:41 GMT
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. 



Mime
View raw message