You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by sc...@apache.org on 2007/09/06 01:07:28 UTC

svn commit: r573093 - /webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/http/SOAPMessageFormatter.java

Author: scheu
Date: Wed Sep  5 16:07:27 2007
New Revision: 573093

URL: http://svn.apache.org/viewvc?rev=573093&view=rev
Log:
AXIS2-3170
Contributor:Mike Rheinheimer
Safeguard against trailing semicolon in content-type

Modified:
    webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/http/SOAPMessageFormatter.java

Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/http/SOAPMessageFormatter.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/http/SOAPMessageFormatter.java?rev=573093&r1=573092&r2=573093&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/http/SOAPMessageFormatter.java (original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/http/SOAPMessageFormatter.java Wed Sep  5 16:07:27 2007
@@ -133,6 +133,16 @@
                 && !"\"\"".equals(soapActionString.trim())) {
             contentType = contentType + "; action=\"" + soapActionString+ "\"";
         }
+        
+        // This is a quick safety catch.  Prior versions of SOAPFormatter
+        // placed a ';' at the end of the content-type.  Many vendors ignore this
+        // last ';'.  However it is not legal and some vendors report an error.
+        // To increase interoperability, the ';' is stripped off.
+        contentType = contentType.trim();
+        if (contentType.lastIndexOf(";") == (contentType.length()-1)) {
+            contentType = contentType.substring(0, contentType.length()-1);
+        }
+        
         if (log.isDebugEnabled()) {
             log.debug("contentType returned =" + contentType);
         }



---------------------------------------------------------------------
To unsubscribe, e-mail: axis-cvs-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-cvs-help@ws.apache.org