You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Martin Grigorov (JIRA)" <ji...@apache.org> on 2012/11/05 08:56:12 UTC
[jira] [Commented] (WICKET-4645) encodeURL broken on Tomcat 7.0.28
[ https://issues.apache.org/jira/browse/WICKET-4645?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13490493#comment-13490493 ]
Martin Grigorov commented on WICKET-4645:
-----------------------------------------
The produced result looks correct to me:
base url: /my-portlets/my-app/configuration-page
input: /my-portlets/my-app/wicket/resource/com.foo.bar.portlets.Anchor/res/Style-ver-1352751065000.css
output: ./wicket/resource/com.foo.bar.portlets.Anchor/res/Style-ver-1352751065000.css
used method: renderer.renderRelativeUrl(input);
You ask for relative Url and Wicket produces a correct (I think) relative url.
Here is the code that would produce what you need:
String encodedFullUrlString = "/my-portlets/my-app/wicket/resource/com.foo.bar.portlets.Anchor/res/Style-ver-1352751065000.css";
Url baseUrl = Url.parse("/my-portlets/my-app/configuration-page");
Url encodedFullUrl = Url.parse(encodedFullUrlString);
UrlRenderer renderer = new UrlRenderer(new MockWebRequest(baseUrl));
String mangledUrl = renderer.renderFullUrl(encodedFullUrl);
System.err.println(Url.parse(mangledUrl).toString(Url.StringMode.LOCAL));
> encodeURL broken on Tomcat 7.0.28
> ---------------------------------
>
> Key: WICKET-4645
> URL: https://issues.apache.org/jira/browse/WICKET-4645
> Project: Wicket
> Issue Type: Bug
> Affects Versions: 6.0.0-beta2
> Reporter: Jens Zastrow
> Assignee: Martin Grigorov
> Fix For: 6.1.0, 1.5.9
>
> Attachments: test.zip, UrlRendererTest.java, wicket-4645.zip
>
>
> During page transition wicket used to encode an '../../tisch' which results in an exception:
> Caused by: java.lang.IllegalArgumentException
> at org.apache.catalina.connector.Response.normalize(Response.java:1799)
> The transition (within an ajax call) :
> http://localhost:8080/wicket/bookmarkable/de.test.pool.manage.ManagePool?11
> http://localhost:8080/tisch
> IMHO the double parent ".." is correct
> There exists already an bugzilla issue created but rejected as invalid https://issues.apache.org/bugzilla/show_bug.cgi?id=53469.
> If the wicket code works as expected there must be an error in the tomcat.
> Maybe the wicket development team has closer access to the tomcat developers :-)
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira