You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by ff...@apache.org on 2007/05/11 05:10:46 UTC

svn commit: r537073 - /incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/attachment/AttachmentDeserializer.java

Author: ffang
Date: Thu May 10 20:10:45 2007
New Revision: 537073

URL: http://svn.apache.org/viewvc?view=rev&rev=537073
Log:
minor change in AttachmentDeserializer to read attachment boundary from message body first in case boundary in contenttype of message header mismatch the boundary in message body

Modified:
    incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/attachment/AttachmentDeserializer.java

Modified: incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/attachment/AttachmentDeserializer.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/attachment/AttachmentDeserializer.java?view=diff&rev=537073&r1=537072&r2=537073
==============================================================================
--- incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/attachment/AttachmentDeserializer.java (original)
+++ incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/attachment/AttachmentDeserializer.java Thu May 10 20:10:45 2007
@@ -91,11 +91,12 @@
         }
 
         if (contentType.toLowerCase().indexOf("multipart/related") != -1) {
-            // First try to find the boundary from the content-type
-            boundary = findBoundaryFromContentType(contentType);
-            // If a boundary wasn't found, try the InputStream
+            // First try to find the boundary from InputStream
+            boundary = findBoundaryFromInputStream();
+            // If a boundary wasn't found, try the ContentType
             if (null == boundary) {
-                boundary = findBoundaryFromInputStream();
+                
+                boundary = findBoundaryFromContentType(contentType);
             }
             // If a boundary still wasn't found, throw an exception
             if (null == boundary) {