axis-c-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nadira...@apache.org
Subject svn commit: r1233772 - /axis/axis1/c/trunk/src/transport/axis3/HTTPTransport.cpp
Date Fri, 20 Jan 2012 05:16:23 GMT
Author: nadiramra
Date: Fri Jan 20 05:16:23 2012
New Revision: 1233772

URL: http://svn.apache.org/viewvc?rev=1233772&view=rev
Log:
AXISCPP-226 minor cookie problem when there is no semi-colons.    

Modified:
    axis/axis1/c/trunk/src/transport/axis3/HTTPTransport.cpp

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=1233772&r1=1233771&r2=1233772&view=diff
==============================================================================
--- axis/axis1/c/trunk/src/transport/axis3/HTTPTransport.cpp (original)
+++ axis/axis1/c/trunk/src/transport/axis3/HTTPTransport.cpp Fri Jan 20 05:16:23 2012
@@ -2032,7 +2032,7 @@ addCookie(const string name, const strin
     
     logExit()
     
-    return true;
+    return AXIS_SUCCESS;
 }
 
 int HTTPTransport::
@@ -2045,18 +2045,24 @@ addCookie(const string nameValuePair)
     // And discards stuff after first ';'
     // This is the same assumption used in Axis Java
 
+    string nameValue = nameValuePair;
     string::size_type ulKeyEndsAt = nameValuePair.find( ";");
 
-    string nameValue;
     if( ulKeyEndsAt != std::string::npos)
         nameValue = nameValuePair.substr( 0, ulKeyEndsAt);
 
     // Now split the nameValue up
     string::size_type nameEndsAt = nameValue.find("=");
     
+    string value = "";
+    if (nameEndsAt != std::string::npos)
+        value = nameValue.substr(nameEndsAt+1);
+
+    int rc = addCookie(nameValue.substr(0, nameEndsAt), value);
+
     logExit()
     
-    return addCookie(nameValue.substr(0, nameEndsAt), nameValue.substr(nameEndsAt+1));
+    return rc;
 }
 
 int HTTPTransport::



Mime
View raw message