-
Notifications
You must be signed in to change notification settings - Fork 6.1k
8208693: HttpClient: Extend the request timeout's scope to cover the response body #27469
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
👋 Welcome back vyazici! A progress list of the required criteria for merging this PR into |
❗ This change is not yet ready to be integrated. |
if (!responseReceived && resetError == Http3Error.H3_REQUEST_REJECTED) { | ||
exchange.markUnprocessedByPeer(); | ||
} |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
src/java.net.http/share/classes/jdk/internal/net/http/MultiExchange.java
Show resolved
Hide resolved
@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. |
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
MultiExchange
TimeoutResponseTestSupport
TimeoutResponseHeaderTest
, and thenTimeoutResponseBodyTest
(Mind the multiple@test
blocks!)Progress
Issue
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