Skip to content

Conversation

vy
Copy link
Contributor

@vy vy commented Sep 24, 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!)

Progress

  • Change must be properly reviewed (1 review required, with at least 1 Reviewer)
  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue

Issue

  • JDK-8208693: HttpClient: Extend the request timeout's scope to cover the response body (Bug - P3)

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/27469/head:pull/27469
$ git checkout pull/27469

Update a local copy of the PR:
$ git checkout pull/27469
$ git pull https://git.openjdk.org/jdk.git pull/27469/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 27469

View PR using the GUI difftool:
$ git pr show -t 27469

Using diff file

Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/27469.diff

@bridgekeeper
Copy link

bridgekeeper bot commented Sep 24, 2025

👋 Welcome back vyazici! A progress list of the required criteria for merging this PR into master will be added to the body of your pull request. There are additional pull request commands available for use with this pull request.

@openjdk
Copy link

openjdk bot commented Sep 24, 2025

❗ This change is not yet ready to be integrated.
See the Progress checklist in the description for automated requirements.

@openjdk openjdk bot added the net net-dev@openjdk.org label Sep 24, 2025
@openjdk
Copy link

openjdk bot commented Sep 24, 2025

@vy The following label will be automatically applied to this pull request:

  • net

When this pull request is ready to be reviewed, an "RFR" email will be sent to the corresponding mailing list. If you would like to change these labels, use the /label pull request command.

Comment on lines +1339 to +1341
if (!responseReceived && resetError == Http3Error.H3_REQUEST_REJECTED) {
exchange.markUnprocessedByPeer();
}
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Without this, server handler's exchange.resetStream(Http3Error.H3_REQUEST_REJECTED.code()) results in client to fail the request, instead of retrying it. I am not sure if H3_REQUEST_REJECTED is the only error code we should guard against.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Figured the problem is more convoluted than it appears. @jaikiran will soon land a PR adressing this issue. I will hold this PR until then.

@kwin
Copy link

kwin commented Oct 13, 2025

@vy Thanks a lot for driving this. I think also the javadoc of the request timeout should be clarified with what timeframe exactly it refers to.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

net net-dev@openjdk.org

Development

Successfully merging this pull request may close these issues.

3 participants