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

Volkan Yazici vyazici at openjdk.org
Wed Oct 22 11:54:31 UTC 2025


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!)

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

Commit messages:
 - Improve docs as suggested by Rajan
 - Merge remote-tracking branch 'upstream/master' into respBodyTime
 - Fix code typo
 - Move `TimerCancellingBodyHandlerWrapper` logic to `HttpBodySubscriberWrapper`
 - Update documentation
 - Merge remote-tracking branch 'upstream/master' into respBodyTime
 - Check the entire causal chain to verify `HttpTimeoutException`
 - Reset timer on retried/forwarded requests
 - Improve `assertInstanceOf` statements
 - Fix timer leak (detected by `RedirectTimeoutTest`)
 - ... and 10 more: https://git.openjdk.org/jdk/compare/f158451c...29e0cdee

Changes: https://git.openjdk.org/jdk/pull/27469/files
  Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=27469&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8208693
  Stats: 917 lines in 14 files changed: 858 ins; 12 del; 47 mod
  Patch: https://git.openjdk.org/jdk/pull/27469.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/27469/head:pull/27469

PR: https://git.openjdk.org/jdk/pull/27469


More information about the net-dev mailing list