Author: markt
Date: Sat Mar 2 22:40:01 2013
New Revision: 1451955
URL: http://svn.apache.org/r1451955
Log:
Add test case that highlights need to switch to Harmony decoder
Modified:
tomcat/trunk/test/org/apache/catalina/connector/TestCoyoteAdapter.java
Modified: tomcat/trunk/test/org/apache/catalina/connector/TestCoyoteAdapter.java
URL:
http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/catalina/connector/TestCoyoteAdapter.java?rev=1451955&r1=1451954&r2=1451955&view=diff
==============================================================================
--- tomcat/trunk/test/org/apache/catalina/connector/TestCoyoteAdapter.java
(original)
+++ tomcat/trunk/test/org/apache/catalina/connector/TestCoyoteAdapter.java Sat
Mar 2 22:40:01 2013
@@ -195,6 +195,24 @@ public class TestCoyoteAdapter extends T
doTestUriDecoding("/foo%c4", "UTF-8", "/foo\uFFFD");
}
+ @Test
+ public void testBug54602d() throws Exception {
+ // Invalid UTF-8
+ doTestUriDecoding("/foo%ff", "UTF-8", "/foo\uFFFD");
+ }
+
+ @Test
+ public void testBug54602e() throws Exception {
+ // Invalid UTF-8
+ doTestUriDecoding("/foo%ed%a0%80", "UTF-8", "/foo\uD800");
+ // TODO Requires a switch to the Harmony based decoder to fix this
+ // Should be
+ //doTestUriDecoding("/foo%ed%a0%80", "UTF-8", "/foo\uFFFD");
+ }
+
+ /*
+ 101, 100, 105, 116, 101, 100
+*/
private void doTestUriDecoding(String path, String encoding,
String expectedPathInfo) throws Exception{
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]