RFR: 8208693: HttpClient: Extend the request timeout's scope to cover the response body [v10]

Daniel Fuchs dfuchs at openjdk.org
Thu Nov 6 12:28:07 UTC 2025


On Thu, 6 Nov 2025 12:13:37 GMT, Volkan Yazici <vyazici at openjdk.org> wrote:

>> Currently `HttpRequest::timeout` only applies until the response headers are received. Extend its scope to also cover the consumption of the response body.
>> 
>> ### Review guidelines
>> 
>> 1. Read _"the fix"_ in `MultiExchange`
>> 2. Skim through the test server *handler* in `TimeoutResponseTestSupport`
>> 3. Review first `TimeoutResponseHeaderTest`, and then `TimeoutResponseBodyTest` (Mind the multiple `@test` blocks!)
>
> Volkan Yazici has updated the pull request incrementally with two additional commits since the last revision:
> 
>  - Clarify WebSocket behaviour and test it
>  - Verify no lingering response timers

test/jdk/java/net/httpclient/websocket/WebSocketTest.java line 172:

> 170:                         .newWebSocketBuilder()
> 171:                         .buildAsync(server.getURI(), webSocketListener)
> 172:                         .join();

Shouldn't you add a `connectTimeout` to the web socket builder? Otherwise of course you won't find any :-)

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/27469#discussion_r2498769015


More information about the net-dev mailing list