Martin Grigorov created WICKET-4514:
---------------------------------------

             Summary: UrlRenderer produces wrong full urls when the passed 
parameter is not absolute (as Url understands 'absolute')
                 Key: WICKET-4514
                 URL: https://issues.apache.org/jira/browse/WICKET-4514
             Project: Wicket
          Issue Type: Bug
          Components: wicket
    Affects Versions: 1.5.5
            Reporter: Martin Grigorov
            Assignee: Martin Grigorov


Code like:

Url baseUrl = Url.parse("one/two/three");
baseUrl.setProtocol("http");
baseUrl.setHost("www.example.com");
baseUrl.setPort(8888);
UrlRenderer renderer = new UrlRenderer(new MockWebRequest(baseUrl));
renderer.setBaseUrl(baseUrl); // this is needed because MockWebRequest cuts data
String fullUrl = renderer.renderFullUrl(Url.parse("../four"));

Produces url: http://www.example.com/../four while it has to be 
http://www.example.com/one/four

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to