-
Notifications
You must be signed in to change notification settings - Fork 145
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
8278067: Make HttpURLConnection default keep alive timeout configurable #437
Conversation
👋 Welcome back dhanalla! A progress list of the required criteria for merging this PR into |
This backport pull request has now been updated with issue from the original commit. |
Webrevs
|
The parent pull request that this pull request depends on has now been integrated and the target branch of this pull request has been updated. This means that changes from the dependent pull request can start to show up as belonging to this pull request, which may be confusing for reviewers. To remedy this situation, simply merge the latest changes from the new target branch into this pull request by running commands similar to these in the local repository for your personal fork: git checkout Backport-JDK-8278067
git fetch https://git.openjdk.org/jdk8u-dev.git master
git merge FETCH_HEAD
# if there are conflicts, follow the instructions given by git merge
git commit -m "Merge master"
git push |
Note the CSR for this is likely this one: I've asked on the specifics of the 8u version, though. |
Thanks @jerboaa |
@jerboaa I've added a follow-up request in the bug. In the meantime, could you please review this PR and the main PR #409 ? |
|
@jerboaa, I have created a CSR https://bugs.openjdk.org/browse/JDK-8326435. |
/csr needed |
@dhanalla has indicated that a compatibility and specification (CSR) request is needed for this pull request. @dhanalla please create a CSR request for issue JDK-8278067 with the correct fix version. This pull request cannot be integrated until the CSR request is approved. |
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.
The text in jdk/src/share/classes/java/net/doc-files/net-properties.html
seems to be indented differently to the 11u version:
+--- a/jdk/src/share/classes/java/net/doc-files/net-properties.html
++++ b/jdk/src/share/classes/java/net/doc-files/net-properties.html
+@@ -172,6 +172,16 @@ <H2>Misc HTTP properties</H2>
If HTTP keepalive is enabled (see above) this value determines the
maximum number of idle connections that will be simultaneously kept
alive, per destination.</P>
-+ <LI><P><B>{@systemProperty http.keepAlive.time.server}</B> and
-+ <B>{@systemProperty http.keepAlive.time.proxy}</B> </P>
++ <LI><P><B>http.keepAlive.time.server</B> and
++ <B>http.keepAlive.time.proxy</B> </P>
+ <P>These properties modify the behavior of the HTTP keepalive cache in the case
-+ where the server (or proxy) has not specified a keepalive time. If the
-+ property is set in this case, then idle connections will be closed after the
-+ specified number of seconds. If the property is set, and the server does
-+ specify a keepalive time in a "Keep-Alive" response header, then the time specified
-+ by the server is used. If the property is not set and also the server
-+ does not specify a keepalive time, then connections are kept alive for an
-+ implementation defined time, assuming {@code http.keepAlive} is {@code true}.</P>
++ where the server (or proxy) has not specified a keepalive time. If the
++ property is set in this case, then idle connections will be closed after the
++ specified number of seconds. If the property is set, and the server does
++ specify a keepalive time in a "Keep-Alive" response header, then the time specified
++ by the server is used. If the property is not set and also the server
++ does not specify a keepalive time, then connections are kept alive for an
++ implementation defined time, assuming {@code http.keepAlive} is {@code true}.</P>
<LI><P><B>http.maxRedirects</B> (default: 20)<BR>
This integer value determines the maximum number, for a given request,
of HTTP redirects that will be automatically followed by the
Can we please align these? Removing the @systemProperty
tag should not mean changing the indentation of the entire block. Comparing while ignoring whitespace changes shows that most of it is identical, bar the first two lines.
Otherwise seems mostly clean. The change to the test library looks fine and the absence of the empty line removal is due to 8279842: HTTPS Channel Binding support for Java GSS/Kerberos being absent (which we should probably also backport at some point as it is in Oracle 8u341)
Thanks @gnu-andrew for reviewing this PR. |
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 seems fine to me. @gnu-andrew should ack it as well.
Nit: This tiny diff still makes it more different than it needs to be as compared to the 11u version (some trailing whitespace):
diff --git a/jdk/src/share/classes/java/net/doc-files/net-properties.html b/jdk/src/share/classes/java/net/doc-files/net-properties.html
index b1964ac4da..2d25e1b9f3 100644
--- a/jdk/src/share/classes/java/net/doc-files/net-properties.html
+++ b/jdk/src/share/classes/java/net/doc-files/net-properties.html
@@ -176,9 +176,9 @@ of proxies.</P>
<B>http.keepAlive.time.proxy</B> </P>
<P>These properties modify the behavior of the HTTP keepalive cache in the case
where the server (or proxy) has not specified a keepalive time. If the
- property is set in this case, then idle connections will be closed after the
+ property is set in this case, then idle connections will be closed after the
specified number of seconds. If the property is set, and the server does
- specify a keepalive time in a "Keep-Alive" response header, then the time specified
+ specify a keepalive time in a "Keep-Alive" response header, then the time specified
by the server is used. If the property is not set and also the server
does not specify a keepalive time, then connections are kept alive for an
implementation defined time, assuming {@code http.keepAlive} is {@code true}.</P>
|
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.
Yes, the two lines Severin mentions still need to be fixed.
I recommend getting a local copy of the 11u patch - e.g. git show c9a72595aa2de5df5849d0b9458ed453bd0dfbad > /tmp/8278067.11u
- and comparing that with what you have in your 8u repository. The only difference in the two patches for net-properties.html
should be the http.keepAlive.time.server
lines.
Thanks @gnu-andrew , Updated the trailing spaces to match those in 11u. |
@dhanalla This change now passes all automated pre-integration checks. 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. As you do not have Committer status in this project an existing Committer must agree to sponsor your change. Possible candidates are the reviewers of this PR (@gnu-andrew, @jerboaa) but any other Committer may sponsor as well. ➡️ To flag this PR as ready for integration with the above commit message, type |
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.
Thanks for persisting with this. Updated version looks good.
GHA failures are https://bugs.openjdk.org/browse/JDK-8324583 |
/approve yes |
@gnu-andrew |
/integrate |
/sponsor |
Going to push as commit 6ba9f58.
Your commit was automatically rebased without conflicts. |
The JDK11 patch didn't apply cleanly 1/4 hunks needed to be port manually.
Test performed and passed:
Progress
Issues
Reviewers
Reviewing
Using
git
Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk8u-dev.git pull/437/head:pull/437
$ git checkout pull/437
Update a local copy of the PR:
$ git checkout pull/437
$ git pull https://git.openjdk.org/jdk8u-dev.git pull/437/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 437
View PR using the GUI difftool:
$ git pr show -t 437
Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk8u-dev/pull/437.diff
Webrev
Link to Webrev Comment