james-mime4j-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mwiederk...@apache.org
Subject svn commit: r880739 - /james/mime4j/trunk/core/src/main/java/org/apache/james/mime4j/parser/AbstractEntity.java
Date Mon, 16 Nov 2009 13:22:46 GMT
Author: mwiederkehr
Date: Mon Nov 16 13:22:46 2009
New Revision: 880739

URL: http://svn.apache.org/viewvc?rev=880739&view=rev
Log:
Do not check header count if maxHeaderCount is not positive (in accordance to the javadoc
of MimeEntityConfig).

Modified:
    james/mime4j/trunk/core/src/main/java/org/apache/james/mime4j/parser/AbstractEntity.java

Modified: james/mime4j/trunk/core/src/main/java/org/apache/james/mime4j/parser/AbstractEntity.java
URL: http://svn.apache.org/viewvc/james/mime4j/trunk/core/src/main/java/org/apache/james/mime4j/parser/AbstractEntity.java?rev=880739&r1=880738&r2=880739&view=diff
==============================================================================
--- james/mime4j/trunk/core/src/main/java/org/apache/james/mime4j/parser/AbstractEntity.java
(original)
+++ james/mime4j/trunk/core/src/main/java/org/apache/james/mime4j/parser/AbstractEntity.java
Mon Nov 16 13:22:46 2009
@@ -178,12 +178,12 @@
     }
 
     protected boolean parseField() throws MimeException, IOException {
-        int maxHeaderLimit = config.getMaxHeaderCount();
+        int maxHeaderCount = config.getMaxHeaderCount();
         for (;;) {
             if (endOfHeader) {
                 return false;
             }
-            if (headerCount >= maxHeaderLimit) {
+            if (maxHeaderCount > 0 && headerCount >= maxHeaderCount) {
                 throw new MaxHeaderLimitException("Maximum header limit exceeded");
             }
 



Mime
View raw message