|
From: Colin S. <col...@ex...> - 2005-11-10 14:25:18
|
Matt Raible wrote: > A few minutes ago, I tried to upgrade AppFuse from 1.2.5 to 1.2.6 > Nightly. For some reason, any URLs that I have mapped to my > UrlFilenameViewController results in a 404. If I revert back to > spring.jar from 1.2.5, everything works fine. > > Any ideas? > This is undoubtedly related to the fix for SPR-1361: http://opensource2.atlassian.com/projects/spring/browse/SPR-1361 The old code was int begin = uri.lastIndexOf('/'); if (begin == -1) { begin = 0; } else { begin++; } the new code is: int begin = (uri.startsWith("/") ? 1 : 0); This is not right, since the URI comes from request.getRequestURI() which will include the entire request URI past the protocol level. I have reopened SPR-1361. It is not clear there is actually a good fix to SPR-1361, to the extent that the controller itself has no real clue how an incoming path was mapped to it. It's the handler mapping that decides that. So it can not know how much of the path to strip off. Colin |