--- a/jdk/src/share/classes/sun/net/www/protocol/http/HttpURLConnection.java Thu Jun 04 11:28:03 2009 +0800
+++ b/jdk/src/share/classes/sun/net/www/protocol/http/HttpURLConnection.java Tue Jun 09 14:17:05 2009 +0800
@@ -1,5 +1,5 @@
/*
- * Copyright 1995-2008 Sun Microsystems, Inc. All Rights Reserved.
+ * Copyright 1995-2009 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -1165,7 +1165,9 @@
AuthenticationHeader authhdr = new AuthenticationHeader (
"Proxy-Authenticate", responses,
- http.getProxyHostUsed(), dontUseNegotiate
+ new HttpCallerInfo(url, http.getProxyHostUsed(),
+ http.getProxyPortUsed()),
+ dontUseNegotiate
);
if (!doingNTLMp2ndStage) {
@@ -1230,7 +1232,8 @@
srvHdr = new AuthenticationHeader (
"WWW-Authenticate", responses,
- url.getHost().toLowerCase(), dontUseNegotiate
+ new HttpCallerInfo(url),
+ dontUseNegotiate
);
String raw = srvHdr.raw();
@@ -1595,7 +1598,9 @@
AuthenticationHeader authhdr = new AuthenticationHeader (
"Proxy-Authenticate", responses,
- http.getProxyHostUsed(), dontUseNegotiate
+ new HttpCallerInfo(url, http.getProxyHostUsed(),
+ http.getProxyPortUsed()),
+ dontUseNegotiate
);
if (!doingNTLMp2ndStage) {
proxyAuthentication =
@@ -1811,9 +1816,9 @@
tryTransparentNTLMProxy = false;
} else if (schemeID == NegotiateAuthentication.NEGOTIATE_AUTH) {
- ret = new NegotiateAuthentication(true, host, port, null, "Negotiate");
+ ret = new NegotiateAuthentication(new HttpCallerInfo(authhdr.getHttpCallerInfo(), "Negotiate"));
} else if (schemeID == NegotiateAuthentication.KERBEROS_AUTH) {
- ret = new NegotiateAuthentication(true, host, port, null, "Kerberos");
+ ret = new NegotiateAuthentication(new HttpCallerInfo(authhdr.getHttpCallerInfo(), "Kerberos"));
}
}
// For backwards compatibility, we also try defaultAuth
@@ -1897,7 +1902,7 @@
} catch (Exception e) {
url1 = url;
}
- ret = new NegotiateAuthentication(false, url1, null, "Kerberos");
+ ret = new NegotiateAuthentication(new HttpCallerInfo(authhdr.getHttpCallerInfo(), "Kerberos"));
}
if (schemeID == NegotiateAuthentication.NEGOTIATE_AUTH) {
URL url1;
@@ -1906,7 +1911,7 @@
} catch (Exception e) {
url1 = url;
}
- ret = new NegotiateAuthentication(false, url1, null, "Negotiate");
+ ret = new NegotiateAuthentication(new HttpCallerInfo(authhdr.getHttpCallerInfo(), "Negotiate"));
}
if (schemeID == BasicAuthentication.BASIC_AUTH) {
PasswordAuthentication a =