RFR: 8208693: HttpClient: Extend the request timeout's scope to cover the response body [v8]
Volkan Yazici
vyazici at openjdk.org
Thu Nov 6 12:13:38 UTC 2025
On Tue, 4 Nov 2025 18:08:11 GMT, Daniel Fuchs <dfuchs at openjdk.org> wrote:
>> src/java.net.http/share/classes/java/net/http/WebSocket.java line 151:
>>
>>> 149: * moment a connection is requested until it is established. The elapsed
>>> 150: * time includes any SSL/TLS handshake.
>>> 151: *
>>
>> This change should probably be ammended.
>> The connectionTimeout for websocket is set as the request timeout for the HTTP upgrade request to websocket.
>> So it includes both the handshake and the 101 response.
>> Now I wonder if we are missing something that will cancel the timer when handing the connection off to WebSocket. It would be good to double check. We had no failing tests so maybe this is properly handled.
>
> And now I wonder too when the timer gets cancelled for an HTTP/2 upgrade.
In c5eae908f27, clarified the WebSocket documentation and added tests to verify its behaviour.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/27469#discussion_r2498716737
More information about the net-dev
mailing list