mirror of
https://github.com/openjdk/jdk.git
synced 2026-07-08 10:09:14 +00:00
7199219: Proxy-Connection headers set incorrectly when a HttpClient is retrieved from the Keep Alive Cache
Reviewed-by: chegar
This commit is contained in:
parent
80d3fce897
commit
152b0d6143
@ -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;
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user