[MRM-440] If webdav URL lacks a trailing /, navigating to all links in the listing return 404.

Fixed by redirecting to proper url in the situation of a GET request on an existing directory.



git-svn-id: https://svn.apache.org/repos/asf/maven/archiva/trunk@593215 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Joakim Erdfelt 2007-11-08 15:59:34 +00:00
parent 8c35e1bbf2
commit 48330ef457
1 changed files with 9 additions and 2 deletions

View File

@ -146,8 +146,15 @@ public class ProxiedDavServer
// If this a directory resource, then we are likely browsing.
if ( resourceFile.exists() && resourceFile.isDirectory() )
{
// TODO: [MRM-440] - If webdav URL lacks a trailing /, navigating to all links in the listing return 404.
// TODO: Issue redirect with proper pathing.
String requestURL = request.getRequest().getRequestURL().toString();
// [MRM-440] - If webdav URL lacks a trailing /, navigating to all links in the listing return 404.
if( !requestURL.endsWith( "/" ) )
{
String redirectToLocation = requestURL + "/";
response.sendRedirect( redirectToLocation );
return;
}
// Process the request.
davServer.process( request, response );