Hi,
I have an application using Karaf 4.1.1, PaxWeb and the jetty provider.
For testing purpose, I am trying the new undertow provider of pax web 6 : Most of my application seems to work, exception for my notification servlet, using the Servlet3 "startAsync" API. Undertow fails with this exception :
Caused by: java.lang.IllegalStateException: UT010026: Async is not supported for this request, as not all filters or Servlets were marked as supporting async
at io.undertow.servlet.spec.HttpServletRequestImpl.startAsync(HttpServletRequestImpl.java:948) ~[?:?]
at javax.servlet.ServletRequestWrapper.startAsync(ServletRequestWrapper.java:432) ~[104:javax.servlet-api:3.1.0]
at javax.servlet.ServletRequestWrapper.startAsync(ServletRequestWrapper.java:432) ~[104:javax.servlet-api:3.1.0]
at xxxx.security.authentication.web.CookieBasedSecurityContextRepository$Servlet3RequestWrapper.startAsync(CookieBasedSecurityContextRepository.java:168) ~[81:xxx.security-core:1.11.0.SNAPSHOT]
at javax.servlet.ServletRequestWrapper.startAsync(ServletRequestWrapper.java:432) ~[104:javax.servlet-api:3.1.0]
at org.springframework.security.web.servletapi.HttpServlet3RequestFactory$Servlet3SecurityContextHolderAwareRequestWrapper.startAsync(HttpServlet3RequestFactory.java:167) ~[?:?]
This application is securised with a SpringSecurity Filter, which has been register as an osgi service, with the property "osgi.http.whiteboard.filter.asyncSupported" = "true", (and works fine with Jetty).
Is there a configuration to add to use an async servlet with undertow ?
Not sure about it, but after reading the code, it looks like the Undertow provider doesn't respect the FilterModel.isAsync(), and don't call the undertow FilterInfo.setAsyncSupported(..) [1]
Regards, Jérémie