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 ga...@apache.org on 2007/07/12 02:51:12 UTC

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

Author: gawor
Date: Wed Jul 11 17:51:11 2007
New Revision: 555445

URL: http://svn.apache.org/viewvc?view=rev&rev=555445
Log:
send session header if session managment is on (AXIS2-2948)

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

Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/http/AbstractHTTPSender.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/http/AbstractHTTPSender.java?view=diff&rev=555445&r1=555444&r2=555445
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/http/AbstractHTTPSender.java (original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/http/AbstractHTTPSender.java Wed Jul 11 17:51:11 2007
@@ -393,13 +393,15 @@
 
         httpMethod.setRequestHeader(HTTPConstants.HEADER_HOST, url.getHost());
 
-        //setting the cookie in the out path
-        Object cookieString = msgContext.getProperty(HTTPConstants.COOKIE_STRING);
+        if (msgContext.getOptions() != null && msgContext.getOptions().isManageSession()) {
+            // setting the cookie in the out path
+            Object cookieString = msgContext.getProperty(HTTPConstants.COOKIE_STRING);
 
-        if (cookieString != null) {
-            StringBuffer buffer = new StringBuffer();
-            buffer.append(cookieString);
-            httpMethod.setRequestHeader(HTTPConstants.HEADER_COOKIE, buffer.toString());
+            if (cookieString != null) {
+                StringBuffer buffer = new StringBuffer();
+                buffer.append(cookieString);
+                httpMethod.setRequestHeader(HTTPConstants.HEADER_COOKIE, buffer.toString());
+            }
         }
 
         if (httpVersion.equals(HTTPConstants.HEADER_PROTOCOL_10)) {



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