assertEquals("/",RequestUtil.normalize("//"));
}
- public void testURLDecodeString() {
+ public void testURLDecodeStringInvalid() {
// %n rather than %nn should throw an IAE according to the Javadoc
Exception exception = null;
try {
}
assertTrue(exception instanceof IllegalArgumentException);
}
+
+ public void testURLDecodeStringValidIso88591Start() {
+
+ String result = RequestUtil.URLDecode("%41xxxx", "ISO-8859-1");
+ assertEquals("Axxxx", result);
+ }
+
+ public void testURLDecodeStringValidIso88591Middle() {
+
+ String result = RequestUtil.URLDecode("xx%41xx", "ISO-8859-1");
+ assertEquals("xxAxx", result);
+ }
+
+ public void testURLDecodeStringValidIso88591End() {
+
+ String result = RequestUtil.URLDecode("xxxx%41", "ISO-8859-1");
+ assertEquals("xxxxA", result);
+ }
+
+ public void testURLDecodeStringValidUtf8Start() {
+ String result = RequestUtil.URLDecode("%c3%aaxxxx", "UTF-8");
+ assertEquals("\u00eaxxxx", result);
+ }
+
+ public void testURLDecodeStringValidUtf8Middle() {
+
+ String result = RequestUtil.URLDecode("xx%c3%aaxx", "UTF-8");
+ assertEquals("xx\u00eaxx", result);
+ }
+
+ public void testURLDecodeStringValidUtf8End() {
+
+ String result = RequestUtil.URLDecode("xxxx%c3%aa", "UTF-8");
+ assertEquals("xxxx\u00ea", result);
+ }
+
}
the expected state transitions. (markt)
</add>
<fix>
+ <bug>50721</bug>: Correctly handle URL decoding where the URL ends in
+ %nn. Patch provided by Christof Marti. (markt)
+ </fix>
+ <fix>
<bug>50748</bug>: Allow the content length header to be set up to the
- point the response is committed when a writer is beng used. (markt)
+ point the response is committed when a writer is being used. (markt)
</fix>
</changelog>
</subsection>