Author: jfrederic.clere(a)jboss.com
Date: 2013-02-13 08:03:08 -0500 (Wed, 13 Feb 2013)
New Revision: 2166
Modified:
branches/7.0.x/java/org/apache/catalina/connector/Request.java
branches/7.0.x/webapps/docs/changelog.xml
Log:
Fix for JBPAPP-9398.
Modified: branches/7.0.x/java/org/apache/catalina/connector/Request.java
===================================================================
--- branches/7.0.x/java/org/apache/catalina/connector/Request.java 2013-02-13 12:20:19 UTC
(rev 2165)
+++ branches/7.0.x/java/org/apache/catalina/connector/Request.java 2013-02-13 13:03:08 UTC
(rev 2166)
@@ -165,6 +165,10 @@
Boolean.valueOf(System.getProperty("org.apache.catalina.connector.Request.SEED_WITH_NEXT_BYTES",
"true")).booleanValue();
+ protected static final boolean THROW_POST_TOO_LARGE =
+
Boolean.valueOf(System.getProperty("org.apache.catalina.connector.Request.THROW_POST_TOO_LARGE",
"false")).booleanValue();
+
+
// ----------------------------------------------------------- Constructors
@@ -2849,7 +2853,10 @@
context.getLogger().debug(
sm.getString("coyoteRequest.postTooLarge"));
}
- return;
+ if (THROW_POST_TOO_LARGE)
+ throw new IllegalStateException("Post too large");
+ else
+ return;
}
byte[] formData = null;
if (len < CACHED_POST_LEN) {
Modified: branches/7.0.x/webapps/docs/changelog.xml
===================================================================
--- branches/7.0.x/webapps/docs/changelog.xml 2013-02-13 12:20:19 UTC (rev 2165)
+++ branches/7.0.x/webapps/docs/changelog.xml 2013-02-13 13:03:08 UTC (rev 2166)
@@ -15,6 +15,15 @@
</properties>
<body>
+<section name="JBoss Web 7.0.18.Final (remm)">
+ <subsection name="Catalina">
+ <changelog>
+ <fix>
+ <jboss-jira>JBPAPP-9398</jboss-jira>: Allow to thrown an exception
when a POST is too large. (jfclere).
+ </fix>
+ </changelog>
+ </subsection>
+</section>
<section name="JBoss Web 7.0.17.Final (remm)">
<subsection name="Catalina">
<changelog>
Show replies by date