Validating that URIUtil.decodePath() can handle null characters
This commit is contained in:
parent
e1fb49d4d7
commit
916097f787
|
@ -60,6 +60,10 @@ public class URITest
|
|||
assertEquals("foo%23;,:=b a r=",URIUtil.decodePath("xxxfoo%2523%3b%2c:%3db%20a%20r%3Dxxx;rubbish".getBytes(),3,30));
|
||||
assertEquals("fää%23;,:=b a r=",URIUtil.decodePath("fää%2523%3b%2c:%3db%20a%20r%3D"));
|
||||
assertEquals("f\u0629\u0629%23;,:=b a r",URIUtil.decodePath("f%d8%a9%d8%a9%2523%3b%2c:%3db%20a%20r"));
|
||||
|
||||
// Test for null character (real world ugly test case)
|
||||
byte odd[] = { '/', 0x00, '/' };
|
||||
assertEquals(new String(odd),URIUtil.decodePath("/%00/"));
|
||||
}
|
||||
|
||||
/* ------------------------------------------------------------ */
|
||||
|
|
Loading…
Reference in New Issue