https://issues.apache.org/bugzilla/show_bug.cgi?id=53469

papegaaij <emond.papega...@topicus.nl> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
         Resolution|INVALID                     |---

--- Comment #8 from papegaaij <emond.papega...@topicus.nl> ---
The problem lies in the fact that encodeURL rewrites the url to absolute. I
think this should only be done in encodeRedirectURL. Wicket also calls
encodeURL to encode urls that are rendered in hrefs on the response page.
Tomcat rewriting them to absolute breaks this badly. This is best illustrated
by an example:

Suppose you are at /a/b and you click a link to /a/b/c/d. This page contains a
link to /1/2. Wicket renders all urls relative, so the link to /1/2 will be
../../../1/2 (it is relative to /a/b/c/d). This link will be passed to
Response.encodeURL, which rewrites it to /a/../../../1/2, which obviously is
wrong and fails.

If you go the other way: you are at /a/b/c/d and click a link to /a/b, which
contains a link to /1/2, things go wrong in a different way. The link to /1/2,
relative to /a/b, will be ../1/2. Tomcat will rewrite it to the absolute url
/a/b/c/../1/2, which is normalized to /a/b/1/2. However, because I've got
cookies enabled, isEncodeable returns false and the unencoded url is returned.

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to