I have a good news: r3122 resolved the problem
and a bad news: the solution suffers from a concurrency bug.
My code looks like this:
try {
response.flushHeaders();
} catch (IOException ex) {
logger.log(Level.INFO, "Failed to send headers", ex);
}
response.discardUpstreamWrites();
When testing this code under load (50-100 concurrent requests),
grizzly never sends the headers to the clients, so clients think that
the response was a HTTP 0.9 response without headers.
We are almost there :)
/i