Fix#11741 as per the WhatTFWG recommendations, use lower case for charset names.
Took the opportunity for some minor optimizations:
+ use the already made HttpField instance in MimeTypes.Type rather than create a new one in the HttpParser.CACHE
+ keep the MimeType.Type associated with the pre encoded Content-Type fields
Fix#12356 Do not send keep-alive when not persistent
---------
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
Co-authored-by: Simone Bordet <simone.bordet@gmail.com>
Fixed initialization for HTTP/2 and HTTP/3.
Fixed test that was relying on default configuration, rather than explicit.
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
* Fixed `ManagedSelector.Accept` to emit the event "accept failed" when closed.
* Fixed `ConnectionLimit` to close connections that exceed the maximum (may happen when the connector is configured with acceptors=0).
* Added test cases.
* Added documentation.
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
* PathResponseListener now yields a PathResponse record with Path and Response.
* Code cleanups.
* Simplified test cases.
* Added documentation.
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
* Issue #11092 - Allow MetaInfConfiguration parsing of java.class.path to support globs
* Work with unwrapped URIs for uriPredicate (and test assertion)
Add SessionHandlerTest case to ensure that flushOnResponseCommit is not broken
in the future.
Signed-off-by: Robert B. Langer <robertlanger03@gmail.com>
This reverts/modified parts of commit 115ee1cf39.
Co-authored-by: Simone Bordet <simone.bordet@gmail.com>
---------
Co-authored-by: Simone Bordet <simone.bordet@gmail.com>
A call to `sweep()`, although protected by the lock for concurrent calls to `reserve()`, may be concurrent with `remove(Entry)`.
`remove(Entry)` in turn calls `entries.remove(Object)`, so that the concurrent iteration in `sweep()` over `entries` fails with an `ArrayIndexOutOfBoundsException`.
Now using the bulk `entries.removeIf(Predicate)` method in `sweep()`, so that sweeping is atomic with respect to `entries.remove(Object)`.
Fixed other occurrences of manual iteration over CopyOnWriteArrayList that may be concurrent with removals.
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
Now `SslSessionData` is stored as a field, rather than in the `SSLSession` as an attribute.
This implies a little more cost to create the `SslSessionData` per connection rather than per `SSLSession`, but it should be negligible.
Now `SslSessionData` cannot be retrieved as a `SSLSession` attribute, but we have explicit APIs to retrieve it, so it should not be a problem.
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
Release request buffer before handling when there is no content
---------
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
Co-authored-by: Simone Bordet <simone.bordet@gmail.com>
* Defaulted the number of selectors to 1 in HttpClientTransportOverHTTP, to align with ClientConnector.
* Improved virtual thread documentation.
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>