james-mime4j-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From b...@apache.org
Subject svn commit: r894101 - in /james/mime4j/trunk/core/src/main/java/org/apache/james/mime4j: parser/RawField.java util/MimeUtil.java
Date Sun, 27 Dec 2009 19:13:31 GMT
Author: bago
Date: Sun Dec 27 19:13:30 2009
New Revision: 894101

URL: http://svn.apache.org/viewvc?rev=894101&view=rev
Log:
Make sure RawField.getBody returns an unfolded string. Then remove unnecessary unfold from
MimeUtil (MIME4J-146).

Modified:
    james/mime4j/trunk/core/src/main/java/org/apache/james/mime4j/parser/RawField.java
    james/mime4j/trunk/core/src/main/java/org/apache/james/mime4j/util/MimeUtil.java

Modified: james/mime4j/trunk/core/src/main/java/org/apache/james/mime4j/parser/RawField.java
URL: http://svn.apache.org/viewvc/james/mime4j/trunk/core/src/main/java/org/apache/james/mime4j/parser/RawField.java?rev=894101&r1=894100&r2=894101&view=diff
==============================================================================
--- james/mime4j/trunk/core/src/main/java/org/apache/james/mime4j/parser/RawField.java (original)
+++ james/mime4j/trunk/core/src/main/java/org/apache/james/mime4j/parser/RawField.java Sun
Dec 27 19:13:30 2009
@@ -21,6 +21,7 @@
 
 import org.apache.james.mime4j.util.ByteSequence;
 import org.apache.james.mime4j.util.ContentUtil;
+import org.apache.james.mime4j.util.MimeUtil;
 
 /**
  * The basic immutable MIME field.
@@ -70,7 +71,7 @@
     private String parseBody() {
         int offset = colonIdx + 1;
         int length = raw.length() - offset;
-        return ContentUtil.decode(raw, offset, length);
+        return MimeUtil.unfold(ContentUtil.decode(raw, offset, length));
     }
 
 }

Modified: james/mime4j/trunk/core/src/main/java/org/apache/james/mime4j/util/MimeUtil.java
URL: http://svn.apache.org/viewvc/james/mime4j/trunk/core/src/main/java/org/apache/james/mime4j/util/MimeUtil.java?rev=894101&r1=894100&r2=894101&view=diff
==============================================================================
--- james/mime4j/trunk/core/src/main/java/org/apache/james/mime4j/util/MimeUtil.java (original)
+++ james/mime4j/trunk/core/src/main/java/org/apache/james/mime4j/util/MimeUtil.java Sun Dec
27 19:13:30 2009
@@ -175,8 +175,6 @@
     @SuppressWarnings("fallthrough")
     public static Map<String, String> getHeaderParams(String pValue) {
         pValue = pValue.trim();
-
-        pValue = unfold(pValue);
         
         Map<String, String> result = new HashMap<String, String>();
 



Mime
View raw message