Author: kkolinko
Date: Mon Mar 25 12:22:25 2013
New Revision: 1460633
URL: http://svn.apache.org/r1460633
Log:
Test for the issue fixed by r1457403
Modified:
tomcat/trunk/test/org/apache/tomcat/util/http/parser/TestAuthorizationDigest.java
Modified:
tomcat/trunk/test/org/apache/tomcat/util/http/parser/TestAuthorizationDigest.java
URL:
http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/tomcat/util/http/parser/TestAuthorizationDigest.java?rev=1460633&r1=1460632&r2=1460633&view=diff
==============================================================================
---
tomcat/trunk/test/org/apache/tomcat/util/http/parser/TestAuthorizationDigest.java
(original)
+++
tomcat/trunk/test/org/apache/tomcat/util/http/parser/TestAuthorizationDigest.java
Mon Mar 25 12:22:25 2013
@@ -297,4 +297,28 @@ public class TestAuthorizationDigest {
Map<String,String> result = HttpParser.parseAuthorizationDigest(input);
Assert.assertNull(result);
}
+
+ @Test
+ public void testParseAuthParamA() throws Exception {
+ // Test for HttpParser.readTokenOrQuotedString()
+ // auth-param = token "=" ( token | quoted-string )
+ String header = "Digest a=b";
+
+ StringReader input = new StringReader(header);
+
+ Map<String,String> result = HttpParser.parseAuthorizationDigest(input);
+ Assert.assertEquals("b", result.get("a"));
+ }
+
+ @Test
+ public void testParseAuthParamB() throws Exception {
+ // Test for HttpParser.readTokenOrQuotedString()
+ // auth-param = token "=" ( token | quoted-string )
+ String header = "Digest a=\"b\"";
+
+ StringReader input = new StringReader(header);
+
+ Map<String,String> result = HttpParser.parseAuthorizationDigest(input);
+ Assert.assertEquals("b", result.get("a"));
+ }
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]