Changed HTTPServerConnection to return a Runnable to be run by the
execution strategy also in case of content.
This allows onDataAvailable() to be called at the proper times.
Fixed HttpChannel to avoid to stack overflow in case of unusual
exceptions thrown while committing.
Now it directly calls the transport to try to send a 500.
Moved the sneaky direct upgrade to its own method and added support to detect a standard upgrade.
The standard upgrade now creates the h2c connection and decodes the settings header, but it does not yet process the
settings nor send a response to the request.
Fixed by tracking both send and recv initial stream windows.
This is needed because both client and server may send an
INITIAL_WINDOW_SIZE setting, and they must be treated
separately.
This reverts commit 8bd94ec6be2c597effa3fdcf44c5d3211767e7e8.
This is a revert of the revert to add back in the useful debug, plus some TODO comments describing the problems
Now the stream close state is updated when the frame has been
successfully written, and when it is received.
The stream is closed in case of failures.
Just after the stream close state update, if the stream is closed
then it is removed from the session.
It is not possible to perform asynchronous processing of the content
of DATA frames, because otherwise the parser has to stop, stalling
all other streams.
Parser.Listener methods were returning boolean in a vestigial attempt
to handle asynchronous data processing, and have now been converted to
return void.
Now instead of having the channel to dispatch when it detects that it
has to call the application (upon receiving a HEADERS frame, or upon
a push "fake" request), now the whole mechanism is controlled by an
ExecutionStrategy.
This is an initial recyling of the channel. The pool is a concurrent linked list, but it may be better to use an array backed list/stack that can easily enforce a maximum pool size.
The pool is currently on the session listener, when it really should be on the HTTP2ServerConnection, but more refactoring is needed for that.
Also the pool is currently inaccessible to the push mechanism