You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by Konstantin Kolinko <kn...@gmail.com> on 2011/11/07 12:38:36 UTC
FailedRequestFilter
Hi!
In trunk I committed a new feature: request attribute that is set if
there were problems during parameter parsing and FailedRequestFilter -
filter that rejects requests if that request attribute is set.
I would like this to be ported to TC7 and earlier versions up to 5.5,
but will wait a while for review and feedback.
To test it I recommend to add the following to the default conf/web.xml:
[[[
<filter>
<filter-name>failedRequestFilter</filter-name>
<filter-class>
org.apache.catalina.filters.FailedRequestFilter
</filter-class>
<async-supported>true</async-supported>
</filter>
<filter-mapping>
<filter-name>failedRequestFilter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
]]]
Revisions in trunk implementing this feature:
http://svn.apache.org/viewvc?rev=1198696&view=rev
http://svn.apache.org/viewvc?rev=1198707&view=rev
Best regards,
Konstantin Kolinko
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
Re: FailedRequestFilter
Posted by Konstantin Kolinko <kn...@gmail.com>.
2011/11/7 Konstantin Kolinko <kn...@gmail.com>:
> Hi!
>
> In trunk I committed a new feature: request attribute that is set if
> there were problems during parameter parsing and FailedRequestFilter -
> filter that rejects requests if that request attribute is set.
>
> I would like this to be ported to TC7 and earlier versions up to 5.5,
> but will wait a while for review and feedback.
>
> To test it I recommend to add the following to the default conf/web.xml:
>
> [[[
> <filter>
> <filter-name>failedRequestFilter</filter-name>
> <filter-class>
> org.apache.catalina.filters.FailedRequestFilter
> </filter-class>
> <async-supported>true</async-supported>
> </filter>
> <filter-mapping>
> <filter-name>failedRequestFilter</filter-name>
> <url-pattern>/*</url-pattern>
> </filter-mapping>
> ]]]
>
> Revisions in trunk implementing this feature:
> http://svn.apache.org/viewvc?rev=1198696&view=rev
> http://svn.apache.org/viewvc?rev=1198707&view=rev
>
Current results with the above fragment added to the default conf/web.xml:
- Examples app OK
- Testsuite passes BIOxNIOxAPR,
though I am not sure whether the tests use conf/web.xml or not.
- WAR upload in manager webapp:
file uploads successfully and the app is deployed,
but there are errors during deployment and undeployment.
I think this FailedRequestFilter is OK for further backport.
Remaining tasks are documenting it: in config/filters.xml. Maybe add
mention of it to maxParameterCount attribute in config/http.xml and
config/ajp.xml and to maxParameterCount feature description in
changelog. I am not yet sure whether to add a commented-out example
of it in the default web.xml, but it seems useful.
Regarding the manager webapp I think the error is not related to this
feature. I will start separate thread with more details. The manager
webapp in trunk as of now is broken.
Best regards,
Konstantin Kolinko
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org