Author: remy.maucherat(a)jboss.com
Date: 2009-11-25 21:00:21 -0500 (Wed, 25 Nov 2009)
New Revision: 1298
Modified:
trunk/java/org/apache/catalina/connector/CoyoteAdapter.java
Log:
- Use the configured tracking mode to use either the url or the cookie for tracking (if
both are allowed, the cookie overrides).
Modified: trunk/java/org/apache/catalina/connector/CoyoteAdapter.java
===================================================================
--- trunk/java/org/apache/catalina/connector/CoyoteAdapter.java 2009-11-26 00:25:58 UTC
(rev 1297)
+++ trunk/java/org/apache/catalina/connector/CoyoteAdapter.java 2009-11-26 02:00:21 UTC
(rev 1298)
@@ -50,6 +50,7 @@
import javax.servlet.AsyncEvent;
import javax.servlet.AsyncListener;
+import javax.servlet.SessionTrackingMode;
import org.apache.catalina.Context;
import org.apache.catalina.Globals;
@@ -568,6 +569,12 @@
return false;
}
+ // Discard session id if SessionTrackingMode.URL is disabled
+ if
(!request.getServletContext().getEffectiveSessionTrackingModes().contains(SessionTrackingMode.URL))
{
+ request.setRequestedSessionId(null);
+ request.setRequestedSessionURL(false);
+ }
+
// Possible redirect
MessageBytes redirectPathMB = request.getMappingData().redirectPath;
if (!redirectPathMB.isNull()) {
@@ -587,14 +594,12 @@
response.sendRedirect(redirectPath);
return false;
}
+
+ // Parse session id if SessionTrackingMode.COOKIE is enabled
+ if
(request.getServletContext().getEffectiveSessionTrackingModes().contains(SessionTrackingMode.COOKIE))
{
+ parseSessionCookiesId(req, request);
+ }
- // FIXME: Session Id processing according to
- // FIXME:
request.getServletContext().getEffectiveSessionTrackingModes().contains(SessionTrackingMode.URL);
- // FIXME:
request.getServletContext().getEffectiveSessionTrackingModes().contains(SessionTrackingMode.COOKIE);
-
- // Parse session Id
- parseSessionCookiesId(req, request);
-
return true;
}
Show replies by date