JDK-8268881 : Release Note: Modified HttpURLConnection Behavior When a Suitable Proxy Is Not Found
  • Type: Sub-task
  • Component: core-libs
  • Sub-Component: java.net
  • Affected Version: 7u321,8u311
  • Priority: P4
  • Status: Closed
  • Resolution: Delivered
  • Submitted: 2021-06-16
  • Updated: 2022-03-23
  • Resolved: 2022-03-23
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 8
8u311Resolved
Description
The behavior of `HttpURLConnection` when using `ProxySelector` has been modified in this JDK release. `HttpURLConnection` used to fall back to a direct connection attempt if the configured proxy(s) failed to make a connection. Beginning with this release, the default behavior has been changed to no longer use a direct connection when the first proxy connection attempt fails.

A new system property, `sun.net.http.fallbackToDirect`, can be set to a value of "true" should an application need to fall back to the old behavior (fall back to a direct connection when the first proxy connection attempt fails).