Author: mmillson
Date: 2010-09-29 11:06:39 -0400 (Wed, 29 Sep 2010)
New Revision: 1561
Modified:
branches/JBOSSWEB_2_1_7_GA_JBPAPP-5170/java/org/apache/catalina/connector/Response.java
Log:
Add the ability to allow rewriting URLs for other contexts for [JBPAPP-5170].
Modified:
branches/JBOSSWEB_2_1_7_GA_JBPAPP-5170/java/org/apache/catalina/connector/Response.java
===================================================================
---
branches/JBOSSWEB_2_1_7_GA_JBPAPP-5170/java/org/apache/catalina/connector/Response.java 2010-09-29
14:53:45 UTC (rev 1560)
+++
branches/JBOSSWEB_2_1_7_GA_JBPAPP-5170/java/org/apache/catalina/connector/Response.java 2010-09-29
15:06:39 UTC (rev 1561)
@@ -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