You are viewing a plain text version of this content. The canonical link for it is here.
Posted to axis-cvs@ws.apache.org by di...@apache.org on 2004/04/05 15:53:48 UTC
cvs commit: ws-axis/java/src/org/apache/axis/attachments MimeUtils.java
dims 2004/04/05 06:53:48
Modified: java/src/org/apache/axis/attachments MimeUtils.java
Log:
Fix for SAAJ 1.2 TCK Failure: Try to use the content type specified in the part then fall back to the content type in the data handler.
Revision Changes Path
1.40 +5 -2 ws-axis/java/src/org/apache/axis/attachments/MimeUtils.java
Index: MimeUtils.java
===================================================================
RCS file: /home/cvs/ws-axis/java/src/org/apache/axis/attachments/MimeUtils.java,v
retrieving revision 1.39
retrieving revision 1.40
diff -u -r1.39 -r1.40
--- MimeUtils.java 25 Feb 2004 14:02:30 -0000 1.39
+++ MimeUtils.java 5 Apr 2004 13:53:48 -0000 1.40
@@ -271,8 +271,11 @@
messageBodyPart.setDataHandler(dh);
- String contentType = dh.getContentType();
-
+ String contentType = part.getContentType();
+ if ((contentType == null)
+ || (contentType.trim().length() == 0)) {
+ contentType = dh.getContentType();
+ }
if ((contentType == null)
|| (contentType.trim().length() == 0)) {
contentType = "application/octet-stream";