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

Reply via email to