Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jetty-dev] CometDServlet behind a filter chain

I'll try and reproduce this in a minimal test case I can share on Github.

Eirik.

On Sat, Mar 1, 2014 at 2:40 PM, Eirik Bjørsnøs <eirbjo@xxxxxxxxx> wrote:
> Hi,
>
> Is it intentional that I have to put
> <async-supported>true</async-supported> on _every_ filter in my filter
> chain before it hits my CometDServlet?
>
> I'm seeing this:
>
> java.lang.IllegalStateException: !asyncSupported
> at org.eclipse.jetty.server.Request.startAsync(Request.java:2044)
> at org.cometd.server.transport.LongPollingTransport.process(LongPollingTransport.java:184)
>
> And the only way to avoid that seems to be to add
> <async-supported>true</async-supported> on every filter in the chain
> before the servlet.
>
> If just one of the filters is missing this, then
> ServletHandler.doFilter will call baseRequest.setAsyncSupported(false)
> and it is never again set to true.
>
> Setting <async-supported>true</async-supported> on the <servlet> does
> not seem to make any difference, as request.isAsyncRequest still
> returns false seen from the LongPollingTransport. Propbably because it
> was set to false by one of the filters in the chain.
>
> Is this just the way Servlet 3.0 async is supposed to work, or am I
> seeing a bug?
>
> Eirik.


Back to the top