axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d...@apache.org
Subject cvs commit: ws-axis/java/src/org/apache/axis/attachments MimeUtils.java
Date Mon, 05 Apr 2004 13:53:48 GMT
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";
  
  
  

Mime
View raw message