8282293: Domain value for system property jdk.https.negotiate.cbt should be case-insensitive

Reviewed-by: weijun, rhalade
This commit is contained in:
Sibabrata Sahoo 2022-03-23 06:45:37 +00:00
parent 1443f6b919
commit 86015e15a5
2 changed files with 11 additions and 3 deletions

View file

@ -332,10 +332,11 @@ public abstract class AbstractDelegateHttpsURLConnection extends
if (prop.startsWith("domain:")) {
String[] domains = prop.substring(7).split(",");
for (String domain : domains) {
if (target.equals(domain)) {
if (target.equalsIgnoreCase(domain)) {
return true;
}
if (domain.startsWith("*.") && target.endsWith(domain.substring(1))) {
if (domain.startsWith("*.") && target.regionMatches(
true, target.length() - domain.length() + 1, domain, 1, domain.length() - 1)) {
return true;
}
}