Author: jfrederic.clere(a)jboss.com
Date: 2013-02-11 05:59:30 -0500 (Mon, 11 Feb 2013)
New Revision: 2160
Modified:
branches/2.1.x/java/org/apache/catalina/connector/Request.java
branches/2.1.x/java/org/jboss/web/rewrite/RewriteValve.java
Log:
Make sure all the strings are reset (thank Kyle Lape).
Modified: branches/2.1.x/java/org/apache/catalina/connector/Request.java
===================================================================
--- branches/2.1.x/java/org/apache/catalina/connector/Request.java 2013-02-11 10:57:28 UTC
(rev 2159)
+++ branches/2.1.x/java/org/apache/catalina/connector/Request.java 2013-02-11 10:59:30 UTC
(rev 2160)
@@ -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: branches/2.1.x/java/org/jboss/web/rewrite/RewriteValve.java
===================================================================
--- branches/2.1.x/java/org/jboss/web/rewrite/RewriteValve.java 2013-02-11 10:57:28 UTC
(rev 2159)
+++ branches/2.1.x/java/org/jboss/web/rewrite/RewriteValve.java 2013-02-11 10:59:30 UTC
(rev 2160)
@@ -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());