that sounds correct. essentially this is the same as running the url through requestcycle.geturlrenderer().renderFullUrl(url) but with a different prefix
-igor On Wed, Sep 14, 2011 at 4:54 PM, Bas Gooren <b...@iswd.nl> wrote: > Hi, > > Another wicket 1.5 migration question: > In 1.4 we created a IRequestCodingStrategy decorator which, in encode(), > translates all urls to be absolute. > We did this by checking if the url started with "/", and if not, removing > all occurrences of "../" and "./". > > To handle being behind a reverse proxy, the constructor optionally accepted > a prefix which was always prepended. > > In 1.5 it seems this could be implemented as an IRequestMapper which > decorates the root mapper. > However, since we are passed a Url instead of a String, and a lot has > changed surrounding url generation, what is the best way to make all urls > absolute? > > I'm thinking: > - check Url.isAbsolute() > - remove segments which are ".." or "." > - prepend prefix segments > > Is this the correct way? > > Sebastian > --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org