* Fixes#7348 - Slow CONNECT request causes NPE (#7349)
Added NPE guard in `HttpReceiverOverHTTP.onUpgradeFrom()`.
Expanded logic in `HttpReceiverOverHTTP.parse()` to return true in case of CONNECT + 200.
Fixed `ProxyConnection.toConnectionString()` to avoid NPEs.
Fixed `HttpClientTest.testCONNECTWithHTTP10()` logic
after changes to fix this issue.
Now a tunneled connection is not put back into the connection pool,
and if applications explicitly want to use it, they must re-enable
fill interest, similarly to what should be done after upgrade+101.
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
(cherry picked from commit 5eb7b70df7)
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
Split the http3 module, introducing the jna and quiche modules with their versions and licenses.
Updated project to reference the new groupId of the quiche binaries.
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
Added http3 Jetty module and distribution test.
Implemented simple logic to send the Alt-Svc header in HTTP/2 responses.
Updated JNA dependency to use jna-jpms.
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
- Split Stream in Stream.Client and Server.Server, so segregate client-specific actions and events.
Now, only Stream.Server has method respond(), and only Stream.Client.Listener has method onResponse().
- Improved javadocs, and updated javadoc module to create javadocs for both http3 and quic modules.
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
- Fixed max streams semantic for HTTP/3.
It's not *concurrent* streams but *cumulative* streams that are limited.
Fixed MultiplexConnectionPool to take that into account with the introduction
of ConnectionPool.MaxUsable.
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
- Improved close mechanism.
Now error and reason are propagated at the HTTP/3 level, in case e.g. applications want to take statistics about the error codes.
- Improved buffer handling to be sure they are properly released back to the pool.
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
- Made HttpChannelOverHTTP3.needContent() to look for content if none is immediately available.
- Improved javadocs.
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
- More work on making HTTP semantic layer work on top of HTTP/3.
- Various fixes and improvement to HTTP client transport tests.
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
- Made sure Connection.Listeners are properly notified.
- Fixed removal of QuicStreamEndPoints from QuicSession in case of successful request/response exchanges.
- Avoid spurious wakeups by shutting down input after receiving a frame with last=true.
- Updated HttpClient transport tests to work with UNIX_DOMAIN.
- Started updating HttpClient transport tests to work with HTTP/3.
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
- Improved logging in QuicheConnection.
- Incremented timeout for echo test in case of large content.
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
- QPACK exceptions now use long instead of int, to be consistent with other error codes.
- Fixed ManagedSelector to count down the stop latches in finally blocks, so that they are always counted down even in case of exceptions.
- Improved exception handling in case of closes.
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
- Moved ExecutionStrategy from ServerQuicConnection to QuicConnection.
For the server the produced task is declared as BLOCKING, but for the
client the produced task is NON_BLOCKING.
- Fixed race condition in QuicSession.process(...).
- Updated quic-quiche pom.xml.
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
- Improved configuration of client and server.
- Started implementation of HttpClientTransportOverHTTP3.
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
- Optimized generation of HEADERS frames.
- Changed QPACK encoder to not flip the buffer, necessary for the optimization above.
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
- Implemented support for GREASE for unidirectional and bidirectional streams.
- Implemented UnknownBodyParser.
- Strengthened validation of frames in control and message streams.
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
- Avoid sending the last=true flag as a separate QUIC frame.
Apparently Quiche has problem notifying this frame to the receiving peer.
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
- More javadocs.
- Fixed QuicSession.fill() to also flush() to send to the remote peer the information that the data has been consumed.
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
- Changed HTTP/3 parsers to return the Frame rather than notifying a listener.
- Correctly linked encoder and decoder streams to respectively QpackEncoder and QpackDecoder.
- Fixed buffer release.
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
- Fixed control streams, must be unidirectional.
- Initial implementation of events to HTTP/3 APIs.
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
- Continued implementation of HTTP/3 APIs, frames and parsing, client and server.
- Figured out creation of streams, to support special HTTP/3 streams.
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
- Started implementation of HTTP/3 APIs, frames and parsing.
- Started implementation of server-side HTTP/3.
- Reworked the threading model in QUIC to be more efficient and avoid contending on the QPACK encoder/decoder.
- Updated QPACK NBitLongEncoder to support QUIC stream IDs of type long.
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>