Actually it was pointed out to me that it is the container & not the app/framework that is generating the Location header, and so isn't the below a bug in toAbsolute()?
On Thu, Apr 8, 2010 at 8:14 AM, Nikita Tovstoles <nikita.tovsto...@gmail.com > wrote: > We use Wicket that periodically redirects to relative URLs starting with > '../'. I realize that's against the RFC (which says redirects are supposed > to be absolute), but I am not clear on why doesn't Tomcat collapse those > URLs in Response.toAbsolute()? Specifically: > > -assume client is at http://localhost/app/home > -app responds to a request with 302 '../home.0' > -Response.toAbsolute() rewrites Location as http://localhost/app/home/ . > . /home.0 (spaces added to avoid spam filter) > > But, if client then issues a GET with exactly that URL - and not > http://localhost/app/home.0, Tomcat will issue a 404. In other words, > toAbsolute() produces a URL that Tomcat cannot service. Why the asymmetry? > In other words, why not collapse the '../' in toAbsolute() - and thus > produce http://localhost/app/home.0? > > thanks > -nikita >