6365587: Proxy-Connection header sent through tunnel
authorchegar
Tue, 23 Feb 2010 17:08:23 +0000
changeset 4923 cd2829ef32e2
parent 4922 16f23522269d
child 4924 5751e91f963a
child 4973 be22f18a1d97
6365587: Proxy-Connection header sent through tunnel Reviewed-by: michaelm
jdk/src/share/classes/sun/net/www/protocol/http/HttpURLConnection.java
--- a/jdk/src/share/classes/sun/net/www/protocol/http/HttpURLConnection.java	Mon Feb 22 15:27:11 2010 +0000
+++ b/jdk/src/share/classes/sun/net/www/protocol/http/HttpURLConnection.java	Tue Feb 23 17:08:23 2010 +0000
@@ -423,7 +423,7 @@
 
             // Try keep-alive only on first attempt
             if (!failedOnce && http.getHttpKeepAliveSet()) {
-                if (http.usingProxy) {
+                if (http.usingProxy && tunnelState() != TunnelState.TUNNELING) {
                     requests.setIfNotSet("Proxy-Connection", "keep-alive");
                 } else {
                     requests.setIfNotSet("Connection", "keep-alive");