You are viewing a plain text version of this content. The canonical link for it is here.
Posted to soap-dev@ws.apache.org by sn...@apache.org on 2002/08/28 20:32:29 UTC

cvs commit: xml-soap/java/src/org/apache/soap/transport TransportMessage.java

snichol     2002/08/28 11:32:29

  Modified:    java/docs changes.html
               java/src/org/apache/soap/transport TransportMessage.java
  Log:
  Bugzilla 11564 reported by aswaters@unity.ncsu.edu (Austin Waters)
  
  Fixed handling of missing Content-Type header.
  
  Revision  Changes    Path
  1.39      +1 -0      xml-soap/java/docs/changes.html
  
  Index: changes.html
  ===================================================================
  RCS file: /home/cvs/xml-soap/java/docs/changes.html,v
  retrieving revision 1.38
  retrieving revision 1.39
  diff -u -r1.38 -r1.39
  --- changes.html	28 Aug 2002 18:13:09 -0000	1.38
  +++ changes.html	28 Aug 2002 18:32:28 -0000	1.39
  @@ -61,6 +61,7 @@
         <li>Add a CORBA provider, allowing CORBA interfaces to be exposed via
         SOAP without writing any code.</li>
         <li>Fixed deserialization of multi-reference arrays.</li>
  +      <li>Fixed handling of missing Content-Type header.</li>
       </ul>
     </li>
   </ul>
  
  
  
  1.14      +10 -8     xml-soap/java/src/org/apache/soap/transport/TransportMessage.java
  
  Index: TransportMessage.java
  ===================================================================
  RCS file: /home/cvs/xml-soap/java/src/org/apache/soap/transport/TransportMessage.java,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- TransportMessage.java	17 Jun 2002 04:17:59 -0000	1.13
  +++ TransportMessage.java	28 Aug 2002 18:32:28 -0000	1.14
  @@ -201,14 +201,16 @@
   
           // Parse and validate content type.
           ContentType cType = null;
  -        try {
  -            // Hack since WebSphere puts ;; instead of just ;
  -            int pos = contentType.indexOf( ";;" );
  -            if ( pos != -1 )
  -              contentType = contentType.substring(0,pos) +
  -                            contentType.substring(pos+1) ;
  -            cType = new ContentType(contentType);
  -        } catch(ParseException pe) {
  +        if (contentType != null) {
  +            try {
  +                // Hack since WebSphere puts ;; instead of just ;
  +                int pos = contentType.indexOf( ";;" );
  +                if ( pos != -1 )
  +                  contentType = contentType.substring(0,pos) +
  +                                contentType.substring(pos+1) ;
  +                cType = new ContentType(contentType);
  +            } catch(ParseException pe) {
  +            }
           }
           if (cType == null)
               throw new SOAPException(Constants.FAULT_CODE_PROTOCOL,