It's common for a client to either close the connection or reset a
stream, so EofException is a better exception to report since it will
be logged at DEBUG level by the server, reducing the noise in the logs.
The fix notifies the transport when a reset frame is received,
allowing the transport to fail the write callback which then notifies
the application, either by throwing (in case of blocking writes) or
by calling error listeners.
Also added a guard, in HttpChannel.handle() for the ERROR_DISPATCH case,
that checks if the response is already committed, and if so, abort
the transport - similar to what's already there for 9.4.
* Issue #824 - Implement notifications of asynchronous error conditions for HTTP/2.
Introduced new method HttpChannelState.asyncError() to be called in
case of asynchronous errors, i.e. those errors that do not happen in
the HttpChannel.handle() loop.
Implemented HTTP/2 callbacks to call HttpChannelState.asyncError()
and plug in the existing error handling mechanism.
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
* Issue #824 - Implement notifications of asynchronous error conditions for HTTP/2.
Improved implementation to ignore idle timeouts for streams and
session in case that requests are being handled, matching the HTTP/1.1
behavior.
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
Defined missing status codes (removed old/wrong javadoc)
Changed use of 413 to 431
Received SETTINGS_MAX_HEADER_LIST_SIZE is set on hpack encoded and warning generated only for large responses.
Reverted to warning if a small SETTINGS_MAX_HEADER_LIST_SIZE. is received.
Setting it on the httpConfig effects all connections, not just the one the
setting was received from.
Fixed by recycling only channels that have completed normally by
having read the request content and responded.
Channels that don't read the request content won't be recycled, thus
avoiding the NPE.
* Made ProduceExecuteConsume the default ExecutionFactory for HTTP/2.
* Made the HTTP/2 fillable callback non-blocking.
* Introduced configuration for the server initial session recv window.
* Sending a WINDOW_UPDATE frame at session setup to inform the client
about the server session recv window.
This is necessary because the HTTP/1.1 machinery will recycle the
Metadata.Request object, and it may race with a thread dispatch to
the HTTP/2 machinery that will handle the request.