Behavioral change introduced by 8161016: Strange behavior of URLConnection with proxy

Ramanand Patil ramanand.patil at oracle.com
Sun Sep 11 06:18:05 UTC 2016


Hi all,

 

This is to inform you all that a recent networking bug fix[1] has introduced a behavioral change to HttpURLConnection. A release note[2] to accompany it is pasted here for convenience :

 

"The behavior of HttpURLConnection when using a ProxySelector has been modified with this JDK release. Currently, HttpURLConnection.connect() call would  fallback to a DIRECT connection attempt if the configured proxy/proxies failed to make a connection.

This release introduces a change whereby no DIRECT connection will be attempted in such a scenario. Instead, the HttpURLConnection.connect() method will fail and throw an IOException which occurred from the last proxy tested.

This behavior now matches with the HTTP connections made by popular web browsers. But this change will bring compatibility issues for the applications expecting a DIRECT connection when a proxy server is down or when wrong proxies are provided."

 

Can I request you all to test a JDK 9 early access build[3] which contains this fix (build 135 or later) and check out for any unexpected breakage because of this change. Please report any issue via the Java bugs portal[4]

 

[1] https://bugs.openjdk.java.net/browse/JDK-8161016

[2] https://bugs.openjdk.java.net/browse/JDK-8164200

[3] https://jdk9.java.net/download/

[4] http://bugreport.java.com/

 

 

Regards,

Ramanand.


More information about the jdk9-dev mailing list