JDK-8183369 : RFC unconformity of HttpURLConnection with proxy
  • Type: Bug
  • Component: core-libs
  • Sub-Component: java.net
  • Affected Version: 9
  • Priority: P3
  • Status: Closed
  • Resolution: Fixed
  • Submitted: 2017-07-03
  • Updated: 2021-09-14
  • Resolved: 2020-03-05
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 11 JDK 13 JDK 14 JDK 15 JDK 7 JDK 8 Other
11.0.8-oracleFixed 13.0.4Fixed 14.0.2Fixed 15 b14Fixed 7u321Fixed 8u311Fixed openjdk8u322Fixed
Related Reports
Relates :  
Relates :  
Relates :  
Description
JDK-8161016 fixes the behavior of HttpURLConnection when using a  ProxySelector.  The fixed code does not use a direct connection, but moreover  it does not even retry to connect (before fixed, it does retry).  This behavior does not conform to HTTP (RFC 7230), which says idempotent methods retry to connect.

See: https://tools.ietf.org/html/rfc7231#section-4.2.2
Comments
8u Review: https://mail.openjdk.java.net/pipermail/jdk8u-dev/2021-August/014153.html
16-08-2021

Fix Request (8u) I'd like to backport this to 8u for parity with Oracle 8u311. It depends on JDK-8161016 first being backported. The patch applies cleanly after unshuffling, but the included test requires a change to the Logger that is configured, due to differences in logging behaviour before/after Jigsaw. RFR thread: https://mail.openjdk.java.net/pipermail/jdk8u-dev/2021-July/014116.html Thanks
16-07-2021

Looks OK in the tests run barring timeout in JDK-8218466 (should be fixed in JDK-8236859)
05-06-2020

Fix request (13u) I'd like to backport it to 13u as well. Patch applies cleanly (after JDK-8227539 which should be ported first).
04-06-2020

Fix Request (11u) Backport to 11u requested because it is a part of 11.0.8-oracle. Patch does not apply cleanly to 11u because test depends on changes from JDK-8227539. Review thread: https://mail.openjdk.java.net/pipermail/jdk-updates-dev/2020-March/002894.html Test is included with the patch.
24-03-2020

Fix Request (14u) As per RFC 7230 idempotent methods should do retry to connect .But HttpURLConnection connect() method is not having a retry with proxy if the connection fails on the first attempt.With the fix , connect() method will do retry with proxy.
05-03-2020

URL: https://hg.openjdk.java.net/jdk/jdk/rev/0ba758a2b6f0 User: dbuck Date: 2020-03-05 08:26:22 +0000
05-03-2020