You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Igor Vaynberg (JIRA)" <ji...@apache.org> on 2010/08/27 09:42:53 UTC

[jira] Resolved: (WICKET-1599) RequestUtils.toAbsolutePath()'s bug

     [ https://issues.apache.org/jira/browse/WICKET-1599?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Igor Vaynberg resolved WICKET-1599.
-----------------------------------

      Assignee: Igor Vaynberg  (was: Alastair Maw)
    Resolution: Incomplete

please provide a quickstart that can at least sometimes reproduce the problem

> RequestUtils.toAbsolutePath()'s bug
> -----------------------------------
>
>                 Key: WICKET-1599
>                 URL: https://issues.apache.org/jira/browse/WICKET-1599
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.3.3
>         Environment: Firefox
>            Reporter: smallufo
>            Assignee: Igor Vaynberg
>
> Suppose the following code in a bookmarkable page , say "FirstPage" :
> When user pushes an AJAX button , the page builds a bookmarkable link :
> Map<String , Object> parameterMap = new HashMap<String , Object>();
> parameterMap.put("index" , myObj.getIndex());
> PageParameters pps = new PageParameters(parameterMap);
> String absUrl = RequestUtils.toAbsolutePath(getRequestCycle().urlFor(SecondPage.class , pps).toString());
> If the user navigates properly (by clicking links to the FirstPage) ,
> the absUrl is correct : foobar/SecondPage/index/1/
> after pre-adding "http://" + req.getServerName() + contextPath + "/" , I can correctly build the (bookmarkable) link like this :
> http://www.foobar.com/app/foobar/SecondPage/index/1
> BUT , if the user directly links to the FirstPage(copy / paste the FirstPage's url in the browser's url bar) ,
> or clicks the SecondPage's link and back (by browser) , and pushes the AJAX button again...
> SOMETIMES , absUrl becomes :
> http://foobar/SecondPage/index/1/ , the preceding "http://" is redundant !!!
> And , my bookmarkable link becomes : http://www.foobar.com/app/http://foobar/SecondPage/index/1
> I can not successfully re-produce this error every time. but sometimes it just occurs .
> It seems it is a bug...
> PS : I know how to build a BookmarkablePageLink in the wicket way , But I have to do this for a special purpose.....(parsing an article and adding links to some keywords)

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.