How about the NullPointerException in HttpGenerator?
By the way, I hacked the HttpGenerator and AbstractGenerator to synchronize access to the _content buffer. While this solves the NPE and makes the SSE flow like they should, each time a SSE request is made from a browser, a Jetty thread ends up in an infinite loop in BlockingHttpConnection.handle():
"qtp1133736492-19" prio=5 tid=7fe871853800 nid=0x10b57f000 runnable [10b57e000]
java.lang.Thread.State: RUNNABLE
at org.eclipse.jetty.http.HttpGenerator.prepareBuffers(HttpGenerator.java:943)
- locked <7f45cb7a8> (a java.lang.Object)
at org.eclipse.jetty.http.HttpGenerator.flushBuffer(HttpGenerator.java:822)
- locked <7f45cb7a8> (a java.lang.Object)
at org.eclipse.jetty.server.BlockingHttpConnection.handle(BlockingHttpConnection.java:79)
at org.eclipse.jetty.server.bio.SocketConnector$ConnectorEndPoint.run(SocketConnector.java:264)
at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:608)
at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:543)
at java.lang.Thread.run(Thread.java:680)
I have a strong feeling that the SocketConnector was never tested with async servlets, and I even fear that its internal design prevents it from ever supporting them.