Now QoSHandler resumes requests using Request.getComponents().getExecutor().
This Executor is configured to be the virtual thread executor, if present, otherwise the Server Executor.
Removed warn() from VirtualThreads.isVirtualThread(), as it was too verbose.
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
Now HpackException.SessionException is treated specially in HTTP2Flusher.
It is caught, it fails all the entries, and then tries to send a GOAWAY, which will be the only frame allowed into the HTTP2FLusher at that point.
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
The test uncovered a larger problem detailed in the issue: the Handler Callback should be non-blocking.
Since all implementations of HttpStream are non-blocking, overridden HttpStream.getInvocationType() to return NON_BLOCKING.
This guarantees that even in case of all server threads blocked, blocked/pending writes can be completed.
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
Implemented Connection.getSslSessionData(), where the Connection can be obtained from the Request:
request.getConnection().getSslSessionData().
Updated documentation.
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
Introduced http2-client.mod and http2-client-transport.mod.
These modules download dependencies via a [files] section.
They can be used to have the server provide the dependencies in case of a web application proxies request using HTTP/2.
Fixed ContentProvider to set the context ClassLoader before reading the Jetty XML context file, which may reference classes from the web application.
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
Updated VirtualThreadPool to limit the number of concurrent virtual threads using a Semaphore.
Updated modules and documentation.
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
Updated VirtualThreadPool to limit the number of concurrent virtual threads using a Semaphore.
Updated modules and documentation.
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
Implemented "priming" of HTTP/1.1 connections using ConnectionPool.preCreateConnections(int) and HttpClientTransportOverHTTP.setInitializeConnections(true).
This sends `OPTIONS * HTTP/1.1` to the server.
I tried to implement this feature by forcing a write of 0 bytes from the layer above `SslConnection`, but it did not work when using TLS because in both WriteFlusher and SslConnection the fact that there are 0 bytes left to write is treated specially.
Other HTTP versions have no problems because they must initialize the connection by e.g. sending a SETTINGS frame, so they would also initialize TLS.
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
Rather than making LifeCycle AutoCloseable, just implement AutoCloseable in the client components.
Update tests to use try-with-resources accordingly.
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
* Now `HttpClient` removed the `Expect` header if there is no request content.
* Changed AbstractProxyServlet and ProxyHandler check for request content: now the Content-Type header is not taken into consideration.
* Now the server avoids sending the 100 Continue response if there is no request content.
* Now the request body is not defaulted if missing, but just kept null.
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
* use standard surefire directory to have result parse via Jenkins
Signed-off-by: Olivier Lamy <olamy@apache.org>
* h2spec last snapshot
Signed-off-by: Olivier Lamy <olamy@apache.org>
* use h2-spec-maven-plugin version 1.0.13
Signed-off-by: Olivier Lamy <olamy@apache.org>
---------
Signed-off-by: Olivier Lamy <olamy@apache.org>
Now also the HttpReceiver.responseContentAvailable() is serialized, so that the access to `this.contentSource` is serialized with failure, and protected by a call to `exchange.isResponseCompleteOrTerminated()`.
Before, it was possible that a thread failed the response, nulling out `this.contentSource`, while another thread was just about to call `responseContentAvailable()` -- this was the case for HTTP/2 in particular, where content is notified asynchronously, rather than being created by a call to `ContentSource.read()`.
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
Now the code examples is a packaging=jar module and it's not under a profile.
The extra execution to compile the code examples is not necessary anymore.
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>