james-mime4j-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From b...@apache.org
Subject svn commit: r1062700 - /james/mime4j/branches/apache-mime4j-0.6/src/main/java/org/apache/james/mime4j/parser/AbstractEntity.java
Date Mon, 24 Jan 2011 09:35:09 GMT
Author: bago
Date: Mon Jan 24 09:35:08 2011
New Revision: 1062700

URL: http://svn.apache.org/viewvc?rev=1062700&view=rev
Log:
Prevent parser from sending an "Invalid Header" monitor message for each mime stream just
at the end of the header (MIME4J-185).

Modified:
    james/mime4j/branches/apache-mime4j-0.6/src/main/java/org/apache/james/mime4j/parser/AbstractEntity.java

Modified: james/mime4j/branches/apache-mime4j-0.6/src/main/java/org/apache/james/mime4j/parser/AbstractEntity.java
URL: http://svn.apache.org/viewvc/james/mime4j/branches/apache-mime4j-0.6/src/main/java/org/apache/james/mime4j/parser/AbstractEntity.java?rev=1062700&r1=1062699&r2=1062700&view=diff
==============================================================================
--- james/mime4j/branches/apache-mime4j-0.6/src/main/java/org/apache/james/mime4j/parser/AbstractEntity.java
(original)
+++ james/mime4j/branches/apache-mime4j-0.6/src/main/java/org/apache/james/mime4j/parser/AbstractEntity.java
Mon Jan 24 09:35:08 2011
@@ -193,6 +193,9 @@ public abstract class AbstractEntity imp
                 len--;
             }
             fieldbuf.setLength(len);
+
+            // we are at the end of the header, the next loop will recognize it.
+            if (len == 0) continue;
             
             boolean valid = true;
             



Mime
View raw message