Hi David,
>
> But, for https, this design doesn't seems to works. The issue only
> pops up with SSL for one reason: while normal requests do not require
> a context, SSL ones do (they require access to their SSL context).
> This context is not part of the request in Grizzly, but is part of the
> Thread. When we run in asynchronous mode, we're running in our own
> thread pool instead of Grizzly's, and thus the thread do not carry
> this information. The first read operation to be executed within the
> asynchronous thread will trigger a ClassCastException, which Grizzly
> mistakenly change into a "InvalidChunkHeader" error.
>
I see.
> Do you think that our design is wrong in this case ?
I don't think the problem is on your side.
To make this work on 1.9 - you need to read off all the request bytes
before suspending the execution.
On Grizzly 2.0, 2.1 it should work fine as it is.
Thanks.
WBR,
Alexey.
> Thanks and Regards
>
> David G.
>