Author: mmillson
Date: 2010-09-29 10:35:28 -0400 (Wed, 29 Sep 2010)
New Revision: 1559
Modified:
branches/2.1.x/java/org/apache/catalina/connector/Response.java
Log:
Add the ability to allow rewriting URLs for other contexts for [JBPAPP-5168].
Modified: branches/2.1.x/java/org/apache/catalina/connector/Response.java
===================================================================
--- branches/2.1.x/java/org/apache/catalina/connector/Response.java 2010-09-29 13:51:33
UTC (rev 1558)
+++ branches/2.1.x/java/org/apache/catalina/connector/Response.java 2010-09-29 14:35:28
UTC (rev 1559)
@@ -65,6 +65,8 @@
public class Response
implements HttpServletResponse {
+ protected static final boolean REWRITE_CONTEXT_CHECK =
+
Boolean.valueOf(System.getProperty("org.apache.catalina.connector.Response.REWRITE_CONTEXT_CHECK",
"true")).booleanValue();
// ----------------------------------------------------------- Constructors
@@ -1534,7 +1536,7 @@
String contextPath = getContext().getPath();
if (contextPath != null) {
String file = url.getFile();
- if ((file == null) || !file.startsWith(contextPath))
+ if ((file == null) || (REWRITE_CONTEXT_CHECK &&
!file.startsWith(contextPath)))
return (false);
String tok = ";" + Globals.SESSION_PARAMETER_NAME + "=" +
session.getIdInternal();
if (file.indexOf(tok, contextPath.length()) >= 0)
Show replies by date