--- a/jdk/src/share/classes/sun/net/www/http/HttpClient.java Thu Sep 27 22:35:07 2012 +0100
+++ b/jdk/src/share/classes/sun/net/www/http/HttpClient.java Fri Sep 28 04:39:02 2012 +0100
@@ -36,6 +36,7 @@
import sun.net.www.ParseUtil;
import sun.net.www.protocol.http.HttpURLConnection;
import sun.util.logging.PlatformLogger;
+import static sun.net.www.protocol.http.HttpURLConnection.TunnelState.*;
/**
* @author Herb Jellinek
@@ -276,6 +277,8 @@
ret.cachedHttpClient = true;
assert ret.inCache;
ret.inCache = false;
+ if (httpuc != null && ret.needsTunneling())
+ httpuc.setTunnelState(TUNNELING);
PlatformLogger logger = HttpURLConnection.getHttpLogger();
if (logger.isLoggable(PlatformLogger.FINEST)) {
logger.finest("KeepAlive stream retrieved from the cache, " + ret);