Fixed concatenation of path and query for HTTP/2 and HTTP/3 when creating `MetaData.ConnectRequest` to "tunnel" the WebSocket upgrade.
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
Introduced method Request.getConnection() to expose the Connection after at the request begin event.
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
Moved the call to destroy the CyclicTimeouts to a close() call that is always called.
Fixed NPE in ManagedSelector.getTotalKeys().
Fixed exception handling to avoid infinite recursion in SslConnection.
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
Now Content-Length and Content-Encoding are removed/modified by the decoder.
In this way, applications have a correct sets of headers to decide whether to decode the content themselves.
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
* Implemented a few required error handlings.
* Changed `Parser.init()` to directly take the listener, rather than wrapping it.
The reason for this change was to be able to reconfigure the Parser upon receiving a SETTINGS frame.
* Initially setting the encoder and decoder max table capacity at the default of 4096, as per spec.
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
* Fixes#8678 - Jetty client receives GO_AWAY and continue to send traffic on same connection
* Now upon receiving the GOAWAY, the connection is removed from the pool, so it cannot be used by new requests.
* HTTP2Session.removeStream() now happens _after_ notifying HEADERS and DATA events, although the Stream state change still happens before.
This is necessary to avoid that a "close" event is notified before a "headers" or "data" event.
With these changes, the race window of a client acquiring a connection while the server is closing it is reduced, but it is impossible to close it completely.
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
* Updating to version 10.0.12
* Updating to version 10.0.13-SNAPSHOT
* VERSION.TXT =+ content of jetty-9.4.49.v20220914 release
* remove strange line and reorder
* Fixes#8558 - Idle timeout occurs on HTTP/2 with InputStreamResponseListener.
The issue was that HttpReceiverOverHTTP2.ContentNotifier.offer() was racy,
as a network thread could have offered a DATA frame, but not yet called
process() -- yet an application thread could have stolen the DATA frame
completed the response and started another response, causing the network
thread to interact with the wrong response.
The implementation has been changed so that HttpReceiverOverHTTP2.ContentNotifier
does not have a queue anymore and it demands DATA frames to the Stream
only when the application demands more -- a simpler model that just forwards
the demand.
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
* Fixes#8532 - Review System.nanoTime() usages.
Introduced o.e.j.util.NanoTime class to deal with nanoTimes.
Now NanoTime.now() should be used instead of System.nanoTime(),
and various <unit>[elapsed|since|until]() methods to calculate nanoTimes.
Furthermore, comparing 2 nanoTimes should be done via isBefore(),
rather than using the < operator, which is wrong as specified in
the System.nanoTime() javadocs.
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
* 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>
- 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>