Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[jetty-dev] Symetrical URI conding/decoding

Hi,

Yes, me again, I forgot something annoying I found on Jetty 9.3 that can be reproduced in 9.4 :

If in an Handler, you use :   
response.sendRedirect("/é");  
(source code in UTF8, 
app started with -Dfile.encoding=UTF-8 
and  System.setProperty("org.eclipse.jetty.util.UrlEncoding.charset", "UTF-8"); as first line in main) 

It's encoded as  /%E9

But the org.eclipse.jetty.util.UrlEncoded.decodeString("/%E9");
throws a org.eclipse.jetty.util.Utf8Appendable$NotUtf8Exception: Not valid UTF8! incomplete UTF8 sequence

The decoder is right, but I think the "encoder" for the redirect should or could encode the string as /%C3%A9

Am I wrong?

Regards,

Guillaume


Back to the top