Rework non-default file system paths of BodySubscriber::ofFile and BodyHandler::ofFile and fix BodyHandler::ofFileDownload to throw consistently for non-default file system paths
Reviewed-by: dfuchs, chegar
The test java.net.httpclient.websocket.WSHandshakeExceptionTest.java checks that the websocket client handles invalid utf-8 sent by the websocket server
Reviewed-by: dfuchs
The fix updates jdk.internal.net.http.websocket. OpeningHandshake.send() method to process the response body from server
Reviewed-by: chegar, dfuchs, prappo
8239595: ssl context version is not respected
The java.net.HttpClient is updated to no longer override any default selected protocols in the SSLContext, in the absence of any SSLParameters explicitly supplied to the HttpClient.builder.
Reviewed-by: chegar, dfuchs
The fix updates the incorrect example of the usage of the class java.net.http.HttpResponse.BodySubscribers.
Reviewed-by: chegar, dfuchs, jboes, pconcannon
The test assumed that ByteBuffer would be split at long boundaries. This is obviously not always the case. A carry has been added to support reading a long split over several buffers.
Reviewed-by: chegar
The SSLTube and SSLFlowDelegate are improved to wrap any non-SSL exception that occur during the handshake in an SSLHandshakeException.
Reviewed-by: chegar
This change fixes several issues with WebSocket and proxy authentication. The AuthenticationFilter is changed to support an authenticating server accessed through an authenticating proxy. MultiExchange is fixed to close the previous connection if a new connection is necessary to establish the websocket (websocket connections are not cached and must be closed in that case). WebSocket OpeningHandshake is fixed to close the connection (without creating the RawChannel) if the opening handshake doesn't result in 101 upgrade protocol.
Reviewed-by: prappo, chegar
When enabled, HttpClient redirect is fixed to drop the body when the request method is changed, and to relay any redirection code it does not understand to the caller.
Reviewed-by: chegar
SSLFlowDelegate.Reader and SubscriberWrapper are changed to better cooperate on when more demand should be requested from upstream. The issue encountered in this scenario was triggered by a large certificate which caused the SSLFlowDelegate to stop requesting data from upstream during the handshake although the engine handshake status was NEED_UNWRAP.
Reviewed-by: chegar
Two tests needed to declared their test methods public, the last one was a simple abstract framework for subclasses and needed its @test keyword removed.
Reviewed-by: chegar, aefimov, dfuchs
HttpResponseInputStream::read(byte[],int,int) now implements the same check than the InputStream::read(byte[],int,int).
Reviewed-by: prappo, chegar, dfuchs
When a non WebSocket connection is not returned to the pool, it needs to be closed even if HttpConnection::isOpen yields false.
Reviewed-by: chegar, michaelm