Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=48285
authormarkt <markt@13f79535-47bb-0310-9956-ffa450edef68>
Fri, 27 Nov 2009 18:01:12 +0000 (18:01 +0000)
committermarkt <markt@13f79535-47bb-0310-9956-ffa450edef68>
Fri, 27 Nov 2009 18:01:12 +0000 (18:01 +0000)
Add handling of Async dispatcher types

git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@884926 13f79535-47bb-0310-9956-ffa450edef68

java/org/apache/catalina/core/ApplicationFilterFactory.java
java/org/apache/catalina/deploy/FilterMap.java

index 8dc705f..57fbf98 100644 (file)
@@ -354,6 +354,12 @@ public final class ApplicationFilterFactory {
                 }
                 break;
             }
+            case ASYNC : {
+                if ((filterMap.getDispatcherMapping() & FilterMap.ASYNC) > 0) {
+                    return true;
+                }
+                break;
+            }
         }
         return false;
     }
index 3239a0d..d22278d 100644 (file)
@@ -52,6 +52,7 @@ public class FilterMap implements Serializable {
     public static final int FORWARD = 2;
     public static final int INCLUDE = 4;
     public static final int REQUEST = 8;
+    public static final int ASYNC = 16;
     
     // represents nothing having been set. This will be seen 
     // as equal to a REQUEST
@@ -134,22 +135,7 @@ public class FilterMap implements Serializable {
     /**
      *
      * This method will be used to set the current state of the FilterMap
-     * representing the state of when filters should be applied:
-     *
-     *        ERROR
-     *        FORWARD
-     *        FORWARD_ERROR
-     *        INCLUDE
-     *        INCLUDE_ERROR
-     *        INCLUDE_ERROR_FORWARD
-     *        REQUEST
-     *        REQUEST_ERROR
-     *        REQUEST_ERROR_INCLUDE
-     *        REQUEST_ERROR_FORWARD_INCLUDE
-     *        REQUEST_INCLUDE
-     *        REQUEST_FORWARD,
-     *        REQUEST_FORWARD_INCLUDE
-     *
+     * representing the state of when filters should be applied.
      */
     public void setDispatcher(String dispatcherString) {
         String dispatcher = dispatcherString.toUpperCase();
@@ -166,6 +152,9 @@ public class FilterMap implements Serializable {
         }  else if (dispatcher.equals(DispatcherType.ERROR.name())) {
             // apply ERROR to the global dispatcherMapping.
             dispatcherMapping |= ERROR;
+        }  else if (dispatcher.equals(DispatcherType.ASYNC.name())) {
+            // apply ERROR to the global dispatcherMapping.
+            dispatcherMapping |= ASYNC;
         }
     }