axis-c-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nadira...@apache.org
Subject svn commit: r1032462 - in /axis/axis1/c/trunk/src: transport/axis3/HTTPTransport.cpp wsdl/org/apache/axis/wsdl/wsdl2ws/c/literal/ClientStubWriter.java wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/literal/ClientStubWriter.java
Date Mon, 08 Nov 2010 05:12:54 GMT
Author: nadiramra
Date: Mon Nov  8 05:12:54 2010
New Revision: 1032462

URL: http://svn.apache.org/viewvc?rev=1032462&view=rev
Log:
AXISCPP-1059 HTTPTransport generates duplicate "Authentication: " headers

Modified:
    axis/axis1/c/trunk/src/transport/axis3/HTTPTransport.cpp
    axis/axis1/c/trunk/src/wsdl/org/apache/axis/wsdl/wsdl2ws/c/literal/ClientStubWriter.java
    axis/axis1/c/trunk/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/literal/ClientStubWriter.java

Modified: axis/axis1/c/trunk/src/transport/axis3/HTTPTransport.cpp
URL: http://svn.apache.org/viewvc/axis/axis1/c/trunk/src/transport/axis3/HTTPTransport.cpp?rev=1032462&r1=1032461&r2=1032462&view=diff
==============================================================================
--- axis/axis1/c/trunk/src/transport/axis3/HTTPTransport.cpp (original)
+++ axis/axis1/c/trunk/src/transport/axis3/HTTPTransport.cpp Mon Nov  8 05:12:54 2010
@@ -1010,6 +1010,8 @@ setTransportProperty( AXIS_TRANSPORT_INF
 /* HTTPTransport::setTransportProperty( Key, Value) Is an overloaded public
  * method used to set a HTTP transport or SSL implementation property.
  *
+ * Any existing transport property will be replaced with the new value.
+ *
  * @param const char* Key is a NULL terminated character string containing
  * the type of information to be stored in either the HTTP Header or SSL
  * implementation settings.
@@ -1029,10 +1031,15 @@ setTransportProperty( const char *pcKey,
 
         bool b_KeyFound = false;
     
-        // Check for well known headers that we add on in every iteration
-        if (strcmp( pcKey, "SOAPAction") == 0 
-                || strcmp( pcKey, "Content-Length") == 0
-                || strcmp( pcKey, "Connection") == 0)
+        // Cookies are handled elsewhere.  For other properties, we first check to
+        // see if there is a matching (i.e. duplicate property) already set.  If one
+        // exists, we replace the value.
+        if(strcmp(pcKey, "Cookie")==0)
+        {
+            iSuccess = addCookie(pcValue);
+            b_KeyFound = true;
+        }
+        else
         {
             std::string strKeyToFind = std::string( pcKey);
     
@@ -1045,15 +1052,12 @@ setTransportProperty( const char *pcKey,
                     break;
                 }
         }
-        else if(strcmp(pcKey, "Cookie")==0)
-        {
-            iSuccess = addCookie(pcValue);
-            b_KeyFound = true;
-        }
         
+        // If the property was not handled, then add it to the list of transport properties.
         if( !b_KeyFound)
             m_vHTTPHeaders.push_back( std::make_pair( (string) pcKey, (string) pcValue));
     }
+
     
     logExitWithReturnCode(iSuccess)
 

Modified: axis/axis1/c/trunk/src/wsdl/org/apache/axis/wsdl/wsdl2ws/c/literal/ClientStubWriter.java
URL: http://svn.apache.org/viewvc/axis/axis1/c/trunk/src/wsdl/org/apache/axis/wsdl/wsdl2ws/c/literal/ClientStubWriter.java?rev=1032462&r1=1032461&r2=1032462&view=diff
==============================================================================
--- axis/axis1/c/trunk/src/wsdl/org/apache/axis/wsdl/wsdl2ws/c/literal/ClientStubWriter.java
(original)
+++ axis/axis1/c/trunk/src/wsdl/org/apache/axis/wsdl/wsdl2ws/c/literal/ClientStubWriter.java
Mon Nov  8 05:12:54 2010
@@ -347,8 +347,7 @@ public class ClientStubWriter
             c_writer.write(";\n");
         c_writer.write("\n");
         
-        c_writer.write("\tif (NULL==axiscCallGetTransportProperty(call,\"SOAPAction\",0))\n");
-        c_writer.write("\t\taxiscCallSetTransportProperty(call,AXISC_SOAPACTION_HEADER ,
\""
+        c_writer.write("\taxiscCallSetTransportProperty(call,AXISC_SOAPACTION_HEADER , \""
                 + minfo.getSoapAction() + "\");\n");
         c_writer.write("\n");
         

Modified: axis/axis1/c/trunk/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/literal/ClientStubWriter.java
URL: http://svn.apache.org/viewvc/axis/axis1/c/trunk/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/literal/ClientStubWriter.java?rev=1032462&r1=1032461&r2=1032462&view=diff
==============================================================================
--- axis/axis1/c/trunk/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/literal/ClientStubWriter.java
(original)
+++ axis/axis1/c/trunk/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/literal/ClientStubWriter.java
Mon Nov  8 05:12:54 2010
@@ -340,8 +340,7 @@ public class ClientStubWriter
             c_writer.write (";\n");
         c_writer.write ("\n");
         
-        c_writer.write ("\t\tif (NULL==m_pCall->getTransportProperty(\"SOAPAction\",false))\n");
-        c_writer.write ("\t\t\tm_pCall->setTransportProperty(SOAPACTION_HEADER , \""
+        c_writer.write ("\t\tm_pCall->setTransportProperty(SOAPACTION_HEADER , \""
                + minfo.getSoapAction () + "\");\n");
         c_writer.write("\n");
         



Mime
View raw message