diff --git a/jetty-util/src/test/java/org/eclipse/jetty/util/URITest.java b/jetty-util/src/test/java/org/eclipse/jetty/util/URITest.java index 9e7479ff82f..d3806c1c229 100644 --- a/jetty-util/src/test/java/org/eclipse/jetty/util/URITest.java +++ b/jetty-util/src/test/java/org/eclipse/jetty/util/URITest.java @@ -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/")); } /* ------------------------------------------------------------ */