We work with Version 6.7.0 Mathias
2013/7/24 Sven Meier <s...@meiers.net>: > Hi, > > which Wicket version? Url parsing has been improved on lately: > > @Test > public void weirdUrl() > { > Url url = Url.parse("http://wicket.apache.org/h@@p://h@@p://"); > > assertEquals("wicket.apache.org", url.getHost()); > assertEquals("/h@@p://h@@p://", url.getPath()); > } > > > Works fine with 6.10.0-SNAPSHOT. > > Sven > > > On 07/24/2013 10:29 AM, Mathias Binder wrote: >> >> Hi, >> >> we became aware of a problem caused by requests with invalid URIs on >> our wicket-application. The URI contains strings like "*://*:*", so >> wicket tries to determine and parse a port number, that is not >> present. This leads to NumberFormatExceptions with URIs like, e.g. >> http://<host>/h@@p://h@@p:// >> >> java.lang.NumberFormatException: For input string: "" >> >> java.lang.NumberFormatException.forInputString(NumberFormatException.java:48) >> java.lang.Integer.parseInt(Integer.java:470) >> java.lang.Integer.parseInt(Integer.java:499) >> org.apache.wicket.request.Url.parse(Url.java:197) >> >> org.apache.wicket.protocol.http.servlet.ServletWebRequest.getContextRelativeUrl(ServletWebRequest.java:222) >> >> org.apache.wicket.protocol.http.servlet.ServletWebRequest.<init>(ServletWebRequest.java:126) >> >> org.apache.wicket.protocol.http.servlet.ServletWebRequest.<init>(ServletWebRequest.java:83) >> >> org.apache.wicket.protocol.http.WebApplication.newWebRequest(WebApplication.java:413) >> >> org.apache.wicket.protocol.http.WebApplication.createWebRequest(WebApplication.java:458) >> >> org.apache.wicket.protocol.http.WicketFilter.processRequest(WicketFilter.java:183) >> >> org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:244) >> >> >> Should this issue be fixed in the URL representation from wicket? >> Something like a check if the string that represents the port-number >> to be parsed is not emtpy? >> >> Thanks >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org >> For additional commands, e-mail: users-h...@wicket.apache.org >> > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org