On Thursday, August 14, 2003, at 06:28 PM, Kalnichevski, Oleg wrote:
Adrian,
With the present implementation of the authentication challenge parser
Basic realm="realm", test
will produce param name: 'test', param value: null, whereas
Basic realm="realm", test=
will produce param name: 'test', param value: ''
I think such behavior is correct. Do you see it differently?
I have no problem with the behavior at all, just wanted to clarify that the change was deliberate. In fact, the change was not to do with how empty parameters at all, but rather that parameters are now stored in lower case form instead of preserving the original case. I think this is valid but it happens to break my test case while still passing yours (I had the same code but used noValue instead of test).
Oleg
The code I'm using (and which passes) is now:
public void testParamsNoParamValue() throws Exception {
Map params = AuthChallengeParser.extractParams("Basic realm=\"test\", noValue");
assertNull(params.get("novalue"));
assertTrue(params.containsKey("novalue");
}
Regards,
Adrian Sutton.
---------------------------------------------- Intencha "tomorrow's technology today" Ph: 38478913 0422236329 Suite 8/29 Oatland Crescent Holland Park West 4121 Australia QLD www.intencha.com
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]