Author: kkolinko Date: Mon Mar 25 12:50:14 2013 New Revision: 1460638 URL: http://svn.apache.org/r1460638 Log: Merged revision r1460633 from tomcat/trunk: Test for the issue fixed by r1457403
Modified: tomcat/tc7.0.x/trunk/ (props changed) tomcat/tc7.0.x/trunk/test/org/apache/tomcat/util/http/parser/TestAuthorizationDigest.java Propchange: tomcat/tc7.0.x/trunk/ ------------------------------------------------------------------------------ Merged /tomcat/trunk:r1460633 Modified: tomcat/tc7.0.x/trunk/test/org/apache/tomcat/util/http/parser/TestAuthorizationDigest.java URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/test/org/apache/tomcat/util/http/parser/TestAuthorizationDigest.java?rev=1460638&r1=1460637&r2=1460638&view=diff ============================================================================== --- tomcat/tc7.0.x/trunk/test/org/apache/tomcat/util/http/parser/TestAuthorizationDigest.java (original) +++ tomcat/tc7.0.x/trunk/test/org/apache/tomcat/util/http/parser/TestAuthorizationDigest.java Mon Mar 25 12:50:14 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: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org