mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 06:45:07 +02:00
8183369: RFC unconformity of HttpURLConnection with proxy
HttpURLConnection retried with proxy if the connection fails on first attempt as per RFC Reviewed-by: chegar, dfuchs, vtewari
This commit is contained in:
parent
d1818942b0
commit
b2f1f73e75
2 changed files with 59 additions and 11 deletions
|
@ -1209,7 +1209,12 @@ public class HttpURLConnection extends java.net.HttpURLConnection {
|
|||
if (p != Proxy.NO_PROXY) {
|
||||
sel.connectFailed(uri, p.address(), ioex);
|
||||
if (!it.hasNext()) {
|
||||
throw ioex;
|
||||
if (logger.isLoggable(PlatformLogger.Level.FINEST)) {
|
||||
logger.finest("Retrying with proxy: " + p.toString());
|
||||
}
|
||||
http = getNewHttpClient(url, p, connectTimeout, false);
|
||||
http.setReadTimeout(readTimeout);
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
throw ioex;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue