changeset 2290:c96d6cb31723

6365587: Proxy-Connection header sent through tunnel Reviewed-by: michaelm
author chegar
date Tue, 23 Feb 2010 17:08:23 +0000
parents e83d9c0d5e95
children b396584a3e64 38fbb2353a6a
files src/share/classes/sun/net/www/protocol/http/HttpURLConnection.java
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/classes/sun/net/www/protocol/http/HttpURLConnection.java	Mon Feb 22 15:27:11 2010 +0000
+++ b/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");