提交 05cd8405 编写于 作者: R robm

7199219: Proxy-Connection headers set incorrectly when a HttpClient is...

7199219: Proxy-Connection headers set incorrectly when a HttpClient is retrieved from the Keep Alive Cache
Reviewed-by: chegar
上级 ad24bc3f
......@@ -36,6 +36,7 @@ import sun.net.www.MeteredStream;
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 @@ public class HttpClient extends NetworkClient {
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);
......
......@@ -351,7 +351,7 @@ public class HttpURLConnection extends java.net.HttpURLConnection {
private HttpClient reuseClient = null;
/* Tunnel states */
enum TunnelState {
public enum TunnelState {
/* No tunnel */
NONE,
......@@ -1740,7 +1740,7 @@ public class HttpURLConnection extends java.net.HttpURLConnection {
*
* @param the state
*/
void setTunnelState(TunnelState tunnelState) {
public void setTunnelState(TunnelState tunnelState) {
this.tunnelState = tunnelState;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册