-
Notifications
You must be signed in to change notification settings - Fork 5.8k
8307648: java/net/httpclient/ExpectContinueTest.java timed out #14207
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
Conversation
👋 Welcome back dfuchs! A progress list of the required criteria for merging this PR into |
Webrevs
|
if (debug.on()) { | ||
debug.log("Received 100 statusCode, but FIN bit is set"); | ||
} | ||
cancelImpl(new IOException("stream closed after 100, no other response expected")); |
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.
This will produce the wrong error code; see https://datatracker.ietf.org/doc/html/rfc9113#name-http-message-framing :
An interim response consists of a HEADERS frame (which might be followed by zero or more CONTINUATION frames) containing the control data and header section of an interim (1xx) HTTP response (see Section 15 of [HTTP]). A HEADERS frame with the END_STREAM flag set that carries an informational status code is malformed (Section 8.1.1).
Malformed requests or responses that are detected MUST be treated as a stream error (Section 5.4.2) of type PROTOCOL_ERROR.
as far as I could tell, cancelImpl
sends CANCEL
error code.
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.
…ional status code is malformed
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.
LGTM.
Given that this alters the client behavior, please add a test or a noreg label.
@dfuch This change now passes all automated pre-integration checks. ℹ️ This project also has non-automated pre-integration requirements. Please see the file CONTRIBUTING.md for details. After integration, the commit message for the final commit will be:
You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed. At the time when this comment was updated there had been 15 new commits pushed to the
As there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to avoid this automatic rebasing, please check the documentation for the /integrate command for further details. ➡️ To integrate this PR with the above commit message to the |
…request should be cancelled too
I have added 8307648 to the |
/integrate |
Going to push as commit 04b0e78.
Your commit was automatically rebased without conflicts. |
Please find here a fix for the java/net/httpclient/ExpectContinueTest.java which was failing intermittently.
It turns out there was two bugs here:
on on the server side, which added the END_STREAM flag to the HeaderFrame containing the 100 response.
This can obviously never be right since 100 is an intermediary response, which should be followed by a final response.
on the client side, because this was interpreted as "there will be no body" - but it didn't prevent the client from waiting for the final response.
With this fix a 100 response carrying the END_STREAM flag will cause the exchange to be cancelled. I manually verified that this worked before fixing the server side.
The logic on server side is fixed to ignore whatever length is passed to sendResponseHeaders() if 100 is supplied, and to not add the END_STREAM flag to the HeaderFrame that carries the 100 response (which is a side effect of setting the expected length parameter to 0 in that case).
Progress
Issue
Reviewers
Reviewing
Using
git
Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/14207/head:pull/14207
$ git checkout pull/14207
Update a local copy of the PR:
$ git checkout pull/14207
$ git pull https://git.openjdk.org/jdk.git pull/14207/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 14207
View PR using the GUI difftool:
$ git pr show -t 14207
Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/14207.diff
Webrev
Link to Webrev Comment