On Wed, Feb 28, 2024 at 5:10 PM Konstantin Kolinko <knst.koli...@gmail.com> wrote: > > > diff --git a/java/org/apache/tomcat/util/descriptor/web/FilterDef.java > > b/java/org/apache/tomcat/util/descriptor/web/FilterDef.java > > index 3a208964e0..b742d5c19c 100644 > > --- a/java/org/apache/tomcat/util/descriptor/web/FilterDef.java > > +++ b/java/org/apache/tomcat/util/descriptor/web/FilterDef.java > > @@ -162,8 +162,14 @@ public class FilterDef implements Serializable { > > > > public void setAsyncSupported(String asyncSupported) { > > this.asyncSupported = asyncSupported; > > + asyncSupportedBoolean = > > !("false".equalsIgnoreCase(asyncSupported)); > > } > > > > + private boolean asyncSupportedBoolean = true; > > Why "true" by default? > > Looking into Java Servlet 4.0 specification, > --- > servlet-4_0_FINAL.pdf > 2.3.3.3 Asynchronous processing says: > "The @WebServlet and @WebFilter annotations described in Chapter 8 have an > attribute - asyncSupported that is a boolean with a default value of false." > > "14.3 Deployment Descriptor" says: > 7. filter Element > ... > The optional async-supported element, when specified, indicates > that the filter supports asynchronous request processing. > > 10. servlet Element > ... > The optional async- > supported element, when specified, indicates that the Servlet can support > asynchronous request processing. > --- > > I read it so that an omission means "false". > I see that the old code uses "false".equalsIgnoreCase(), but I wonder why.
I coded it like this because of that, so it is equivalent. And it then works because of: https://github.com/apache/tomcat/blob/main/java/org/apache/catalina/startup/ContextConfig.java#L1398 > Also I wonder whether FilterDef and ServletDef classes handling of > asyncSupported could be aligned. I didn't want to change the API [ok only in 11]. Rémy --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org