up sync from 6.0
authorfhanik <fhanik@13f79535-47bb-0310-9956-ffa450edef68>
Fri, 20 Jul 2007 22:28:05 +0000 (22:28 +0000)
committerfhanik <fhanik@13f79535-47bb-0310-9956-ffa450edef68>
Fri, 20 Jul 2007 22:28:05 +0000 (22:28 +0000)
http://svn.apache.org/viewvc?view=rev&rev=554814
http://svn.apache.org/viewvc?view=rev&rev=555304

git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@558178 13f79535-47bb-0310-9956-ffa450edef68

java/org/apache/catalina/connector/CoyoteAdapter.java
java/org/apache/catalina/connector/Response.java
java/org/apache/catalina/realm/RealmBase.java
webapps/docs/config/http.xml

index 73118ac..3011eda 100644 (file)
@@ -510,7 +510,7 @@ public class CoyoteAdapter
             if (request.isRequestedSessionIdFromURL()) {
                 // This is not optimal, but as this is not very common, it
                 // shouldn't matter
-                redirectPath = redirectPath + ";jsessionid=" 
+                redirectPath = redirectPath + ";" + Globals.SESSION_PARAMETER_NAME + "=" 
                     + request.getRequestedSessionId();
             }
             if (query != null) {
index ba28742..5041348 100644 (file)
@@ -1447,7 +1447,8 @@ public class Response
             String file = url.getFile();
             if ((file == null) || !file.startsWith(contextPath))
                 return (false);
-            if( file.indexOf(";jsessionid=" + session.getIdInternal()) >= 0 )
+            String tok = ";" + Globals.SESSION_PARAMETER_NAME + "=" + session.getIdInternal();
+            if( file.indexOf(tok, contextPath.length()) >= 0 )
                 return (false);
         }
 
@@ -1581,7 +1582,9 @@ public class Response
         }
         StringBuffer sb = new StringBuffer(path);
         if( sb.length() > 0 ) { // jsessionid can't be first.
-            sb.append(";jsessionid=");
+            sb.append(";");
+            sb.append(Globals.SESSION_PARAMETER_NAME);
+            sb.append("=");
             sb.append(sessionId);
         }
         sb.append(anchor);
index a184f52..a953225 100644 (file)
@@ -37,6 +37,7 @@ import javax.servlet.http.HttpServletResponse;
 
 import org.apache.catalina.Container;
 import org.apache.catalina.Context;
+import org.apache.catalina.Globals;
 import org.apache.catalina.Lifecycle;
 import org.apache.catalina.LifecycleException;
 import org.apache.catalina.LifecycleListener;
@@ -944,7 +945,9 @@ public abstract class RealmBase
         String requestedSessionId = request.getRequestedSessionId();
         if ((requestedSessionId != null) &&
             request.isRequestedSessionIdFromURL()) {
-            file.append(";jsessionid=");
+            file.append(";");
+            file.append(Globals.SESSION_PARAMETER_NAME);
+            file.append("=");
             file.append(requestedSessionId);
         }
         String queryString = request.getQueryString();
index 4d5afa2..631b878 100644 (file)
 
     <attribute name="server" required="false">
       <p>The Server header for the http response.
-         Unless your paranoid, you won't need this feature.
+         Unless you are paranoid, you won't need this feature.
       </p>
     </attribute>