Author: remy.maucherat(a)jboss.com
Date: 2012-10-10 13:48:22 -0400 (Wed, 10 Oct 2012)
New Revision: 2106
Modified:
branches/7.2.x/src/main/java/org/apache/catalina/connector/Response.java
Log:
JBWEB-249: Avoid doing any encoding if not using URL tracking.
Modified: branches/7.2.x/src/main/java/org/apache/catalina/connector/Response.java
===================================================================
--- branches/7.2.x/src/main/java/org/apache/catalina/connector/Response.java 2012-10-08
13:48:50 UTC (rev 2105)
+++ branches/7.2.x/src/main/java/org/apache/catalina/connector/Response.java 2012-10-10
17:48:22 UTC (rev 2106)
@@ -39,6 +39,7 @@
import java.util.Vector;
import javax.servlet.ServletOutputStream;
+import javax.servlet.SessionTrackingMode;
import javax.servlet.http.Cookie;
import javax.servlet.http.HttpServletResponse;
@@ -1576,6 +1577,12 @@
// Are we in a valid session that is not using cookies?
final Request hreq = request;
+
+ // Is URL encoding permitted
+ if
(!hreq.getServletContext().getEffectiveSessionTrackingModes().contains(SessionTrackingMode.URL))
{
+ return false;
+ }
+
final Session session = hreq.getSessionInternal(false);
if (session == null)
return (false);
Show replies by date