Hi Konstantin, On 07.11.2011 02:46, kkoli...@apache.org wrote: > Author: kkolinko > Date: Mon Nov 7 10:46:14 2011 > New Revision: 1198696 > > URL: http://svn.apache.org/viewvc?rev=1198696&view=rev > Log: > Introduce new request attribute to be used to mark request if there was a > failure during parameter parsing, > and a Filter that triggers parameter parsing and rejects requests marked with > that attribute. > > Added: > tomcat/trunk/java/org/apache/catalina/filters/FailedRequestFilter.java > (with props) > Modified: > tomcat/trunk/java/org/apache/catalina/Globals.java > tomcat/trunk/java/org/apache/catalina/connector/Request.java > tomcat/trunk/java/org/apache/tomcat/util/http/Parameters.java > > Modified: tomcat/trunk/java/org/apache/catalina/Globals.java > URL: > http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/Globals.java?rev=1198696&r1=1198695&r2=1198696&view=diff > ============================================================================== > --- tomcat/trunk/java/org/apache/catalina/Globals.java (original) > +++ tomcat/trunk/java/org/apache/catalina/Globals.java Mon Nov 7 10:46:14 > 2011 > @@ -226,6 +226,17 @@ public final class Globals { > > > /** > + * The request attribute that is set to {@code Boolean.TRUE} if some > request > + * parameters have been ignored during request parameters parsing. It can > + * happen, for example, if there is a limit on the total count of > parseable > + * parameters, or if parameter cannot be decoded, or any other error > + * happened during parameter parsing. > + */ > + public static final String PARAMETER_PARSE_FAILED_ATTR = > + "org.apache.catalina.parameter_parse_failed";
I don't now if we ever have to make the new request attribute available in coyote request, but in o.a.c.connector.Request there is code that only passes attributes down to the coyote request if the attribute name starts with "org.apache.tomcat". See removeAttribute() and setAttribute(): 1413 // Pass special attributes to the native layer 1414 if (name.startsWith("org.apache.tomcat.")) { 1415 coyoteRequest.getAttributes().remove(name); 1416 } ... 1520 // Pass special attributes to the native layer 1521 if (name.startsWith("org.apache.tomcat.")) { 1522 coyoteRequest.setAttribute(name, value); 1523 } In fact this use of "org.apache.tomcat." could also another Global constant. Regards, Rainer --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org