Author: bmaxwell
Date: 2013-02-12 19:58:42 -0500 (Tue, 12 Feb 2013)
New Revision: 2163
Modified:
tags/JBOSSWEB_2_1_12_GA_patch03_JBPAPP-10636/java/org/apache/InstanceManager.java
tags/JBOSSWEB_2_1_12_GA_patch03_JBPAPP-10636/java/org/apache/catalina/connector/Request.java
tags/JBOSSWEB_2_1_12_GA_patch03_JBPAPP-10636/java/org/apache/catalina/deploy/InjectionTarget.java
tags/JBOSSWEB_2_1_12_GA_patch03_JBPAPP-10636/java/org/apache/jasper/runtime/InstanceManagerFactory.java
tags/JBOSSWEB_2_1_12_GA_patch03_JBPAPP-10636/java/org/jboss/web/rewrite/RewriteValve.java
Log:
[JBPAPP-10636] backport fix for After RewriteValve has rewritten the context path,
HttpServletRequest.getRequestURI() still returns the original URI.
Modified:
tags/JBOSSWEB_2_1_12_GA_patch03_JBPAPP-10636/java/org/apache/InstanceManager.java
===================================================================
---
tags/JBOSSWEB_2_1_12_GA_patch03_JBPAPP-10636/java/org/apache/InstanceManager.java 2013-02-13
00:11:14 UTC (rev 2162)
+++
tags/JBOSSWEB_2_1_12_GA_patch03_JBPAPP-10636/java/org/apache/InstanceManager.java 2013-02-13
00:58:42 UTC (rev 2163)
@@ -25,7 +25,7 @@
import javax.naming.NamingException;
/**
- * @version $Rev:$ $Date:$
+ * @version $Rev$ $Date$
*/
public interface InstanceManager {
Modified:
tags/JBOSSWEB_2_1_12_GA_patch03_JBPAPP-10636/java/org/apache/catalina/connector/Request.java
===================================================================
---
tags/JBOSSWEB_2_1_12_GA_patch03_JBPAPP-10636/java/org/apache/catalina/connector/Request.java 2013-02-13
00:11:14 UTC (rev 2162)
+++
tags/JBOSSWEB_2_1_12_GA_patch03_JBPAPP-10636/java/org/apache/catalina/connector/Request.java 2013-02-13
00:58:42 UTC (rev 2163)
@@ -2543,7 +2543,8 @@
if (context.getLogger().isDebugEnabled()) {
context.getLogger().debug("Post too large");
}
- return;
+ throw new IllegalArgumentException("MERDE");
+ // return;
}
byte[] formData = null;
if (len < CACHED_POST_LEN) {
Modified:
tags/JBOSSWEB_2_1_12_GA_patch03_JBPAPP-10636/java/org/apache/catalina/deploy/InjectionTarget.java
===================================================================
---
tags/JBOSSWEB_2_1_12_GA_patch03_JBPAPP-10636/java/org/apache/catalina/deploy/InjectionTarget.java 2013-02-13
00:11:14 UTC (rev 2162)
+++
tags/JBOSSWEB_2_1_12_GA_patch03_JBPAPP-10636/java/org/apache/catalina/deploy/InjectionTarget.java 2013-02-13
00:58:42 UTC (rev 2163)
@@ -21,7 +21,7 @@
package org.apache.catalina.deploy;
/**
- * @version $Rev:$ $Date:$
+ * @version $Rev$ $Date$
*/
public class InjectionTarget {
private String targetClass;
Modified:
tags/JBOSSWEB_2_1_12_GA_patch03_JBPAPP-10636/java/org/apache/jasper/runtime/InstanceManagerFactory.java
===================================================================
---
tags/JBOSSWEB_2_1_12_GA_patch03_JBPAPP-10636/java/org/apache/jasper/runtime/InstanceManagerFactory.java 2013-02-13
00:11:14 UTC (rev 2162)
+++
tags/JBOSSWEB_2_1_12_GA_patch03_JBPAPP-10636/java/org/apache/jasper/runtime/InstanceManagerFactory.java 2013-02-13
00:58:42 UTC (rev 2163)
@@ -25,7 +25,7 @@
import org.apache.InstanceManager;
/**
- * @version $Rev:$ $Date:$
+ * @version $Rev$ $Date$
*/
public class InstanceManagerFactory {
Modified:
tags/JBOSSWEB_2_1_12_GA_patch03_JBPAPP-10636/java/org/jboss/web/rewrite/RewriteValve.java
===================================================================
---
tags/JBOSSWEB_2_1_12_GA_patch03_JBPAPP-10636/java/org/jboss/web/rewrite/RewriteValve.java 2013-02-13
00:11:14 UTC (rev 2162)
+++
tags/JBOSSWEB_2_1_12_GA_patch03_JBPAPP-10636/java/org/jboss/web/rewrite/RewriteValve.java 2013-02-13
00:58:42 UTC (rev 2163)
@@ -426,6 +426,7 @@
urlString = urlString.substring(0, queryIndex);
}
// Set the new URL
+ request.getCoyoteRequest().requestURI().setString(null);
CharChunk chunk =
request.getCoyoteRequest().requestURI().getCharChunk();
chunk.recycle();
if (context) {
@@ -435,6 +436,7 @@
request.getCoyoteRequest().requestURI().toChars();
// Set the new Query if there is one
if (queryString != null) {
+ request.getCoyoteRequest().queryString().setString(null);
chunk = request.getCoyoteRequest().queryString().getCharChunk();
chunk.recycle();
chunk.append(queryString);
@@ -442,6 +444,7 @@
}
// Set the new host if it changed
if (!host.equals(request.getServerName())) {
+ request.getCoyoteRequest().serverName().setString(null);
chunk = request.getCoyoteRequest().serverName().getCharChunk();
chunk.recycle();
chunk.append(host.toString());
Show replies by date