tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rj...@apache.org
Subject svn commit: r944511 - /tomcat/trunk/java/org/apache/catalina/connector/CoyoteAdapter.java
Date Fri, 14 May 2010 23:14:51 GMT
Author: rjung
Date: Fri May 14 23:14:51 2010
New Revision: 944511

URL: http://svn.apache.org/viewvc?rev=944511&view=rev
Log:
Check whether context is null.

Modified:
    tomcat/trunk/java/org/apache/catalina/connector/CoyoteAdapter.java

Modified: tomcat/trunk/java/org/apache/catalina/connector/CoyoteAdapter.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/connector/CoyoteAdapter.java?rev=944511&r1=944510&r2=944511&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/connector/CoyoteAdapter.java (original)
+++ tomcat/trunk/java/org/apache/catalina/connector/CoyoteAdapter.java Fri May 14 23:14:51
2010
@@ -753,7 +753,13 @@ public class CoyoteAdapter implements Ad
 
         for (int i = 0; i < count; i++) {
             ServerCookie scookie = serverCookies.getCookie(i);
-            if (scookie.getName().equals(sessionCookieName)) {
+            String scName;
+            if (context == null) {
+                scName = Globals.SESSION_COOKIE_NAME;
+            } else {
+                scName = context.getSessionCookieName();
+            }
+            if (scookie.getName().equals(scName)) {
                 // Override anything requested in the URL
                 if (!request.isRequestedSessionIdFromCookie()) {
                     // Accept only the first session id cookie



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Mime
View raw message