Here I attach a patch for DigestAuthentication.java that should fix the problems with DIGEST authentication.
- // in some cases qop has quotes, and in some not. We'll support both
- if (currentTokenValue.startsWith("\"") && currentTokenValue.endsWith("\"")) {
- qop = removeQuotes(currentTokenValue);
- } else {
- qop = currentTokenValue;
- }
It appears that qop is not the only problem, the sun java plug-in (v1.4.1) sends the nc value quoted.
This prevents applets logging in.
It might be worth leaving qop = removeQuotes(currentTokenValue);
change the nc line to call removeQuotes, i.e. nc = removeQuotes(currentTokenValue);
and add a test to the start of removeQuotes method as follows:
protected static String removeQuotes(String quotedString) {
if ((!quotedString.startsWith("\"")) || (!quotedString.endsWith("\"")))
return quotedString;
if (quotedString.length() > 2) {
return quotedString.substring(1, quotedString.length() - 1);
} else {
return new String();
}
}
This would prevent the same problem happening on any of the digest fields.
Barry.
_________________________________________________________________
Protect your PC - get McAfee.com VirusScan Online http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]