From: RBRi <rb...@us...> - 2018-07-29 09:19:23
|
2.32 is out, will close this --- ** [bugs:#1973] URLs are not properly encoded as UTF-8** **Status:** pending **Group:** 2.31 **Created:** Thu Jul 12, 2018 01:42 AM UTC by Thrawn **Last Updated:** Thu Jul 19, 2018 07:12 PM UTC **Owner:** RBRi HTMLUnit is not properly encoding UTF-8 request URLs. This causes failures when servers strictly validate those URLs. Minimal test case: - A Spring controller that calls HttpServletRequest.getParameterMap(), such as: @RequestMapping(value = "/", method = {RequestMethod.GET, RequestMethod.HEAD}) public String welcome(HttpServletRequest request) { request.getParameterMap(); return "index"; } - Run on Jetty 9.4.x (9.4.9.v20180320 and 9.4.11.v20180605 are confirmed), eg using the Jetty Maven plugin - Run a unit test that creates a Selenium HTMLUnitDriver and attempts to load /?param=Publisher`s\u2013\u00a0Internationalé\u2014Pty\u00a9Ltd Expected: The page loads and ignores the parameter Actual: A server error occurs, reporting: org.eclipse.jetty.util.Utf8Appendable$NotUtf8Exception: Not valid UTF8! byte A0 in state 0 at org.eclipse.jetty.util.Utf8Appendable.appendByte (Utf8Appendable.java:253) at org.eclipse.jetty.util.Utf8Appendable.append (Utf8Appendable.java:158) at org.eclipse.jetty.util.UrlEncoded.decodeUtf8To (UrlEncoded.java:354) at org.eclipse.jetty.util.UrlEncoded.decodeUtf8To (UrlEncoded.java:296) at org.eclipse.jetty.http.HttpURI.decodeQueryTo (HttpURI.java:615) at org.eclipse.jetty.server.Request.extractQueryParameters (Request.java:437) at org.eclipse.jetty.server.Request.getParameters (Request.java:401) at org.eclipse.jetty.server.Request.getParameterMap (Request.java:1035) --- Sent from sourceforge.net because htm...@li... is subscribed to https://sourceforge.net/p/htmlunit/bugs/ To unsubscribe from further messages, a project admin can change settings at https://sourceforge.net/p/htmlunit/admin/bugs/options. Or, if this is a mailing list, you can unsubscribe from the mailing list. |