You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by mg...@apache.org on 2020/10/06 06:46:08 UTC

[tomcat] branch 7.0.x updated: Update FailedRequestFilter's javadoc

This is an automated email from the ASF dual-hosted git repository.

mgrigorov pushed a commit to branch 7.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/7.0.x by this push:
     new ffc8259  Update FailedRequestFilter's javadoc
ffc8259 is described below

commit ffc82592db196ae320820bc0d0b9f9510fb303bf
Author: Martin Tzvetanov Grigorov <mg...@apache.org>
AuthorDate: Tue Oct 6 09:44:01 2020 +0300

    Update FailedRequestFilter's javadoc
    
    Use same text as at http://tomcat.apache.org/tomcat-9.0-doc/config/filter.html#Failed_Request_Filter
    
    discussed-at: https://markmail.org/message/ys3el54jmzta5jby
    (cherry picked from commit 864b138b3948011219b23a9b754cce3a94abe25e)
---
 java/org/apache/catalina/filters/FailedRequestFilter.java | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/java/org/apache/catalina/filters/FailedRequestFilter.java b/java/org/apache/catalina/filters/FailedRequestFilter.java
index c2ad5b4..7b2e188 100644
--- a/java/org/apache/catalina/filters/FailedRequestFilter.java
+++ b/java/org/apache/catalina/filters/FailedRequestFilter.java
@@ -38,11 +38,12 @@ import org.apache.tomcat.util.http.Parameters.FailReason;
  * submitted by client are lost.
  *
  * <p>
- * Note that it has side effect that it triggers parameter parsing and thus
- * consumes the body for POST requests. Parameter parsing does check content
- * type of the request, so there should not be problems with addresses that use
- * <code>request.getInputStream()</code> and <code>request.getReader()</code>,
- * if requests parsed by them do not use standard value for content mime-type.
+ * Note that parameter parsing may consume the body of an HTTP request, so
+ * caution is needed if the servlet protected by this filter uses
+ * <code>request.getInputStream()</code> or <code>request.getReader()</code>
+ * calls. In general the risk of breaking a web application by adding this
+ * filter is not so high, because parameter parsing does check content type
+ * of the request before consuming the request body.
  */
 public class FailedRequestFilter extends FilterBase implements CometFilter {
 


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org