Hello there!
In Archiva's (v2.2.9) default configuration, repositories "internal" and
"snapshots" have a path like this:
./repositories/internal
Prefix "./" causes all repo-api requests to fail with status code "Bad
Request" (see below for an explanation and code reference).
When looking at the folders created in the working directory, I also
believe, the current default configuration for repo "Directory" and
"Index Directory" has not been updated since paths have been reworked.
Cheers
Holger M.
Explanation of the Bad Request responses
----------------------------------------
The server validates requests by checking if the given canonicalized
resource path is equal to an absolute path and replies with Bad Request
(400) if not. Unfortunately, the absolute path contains the user
configured repository directory path, which may not be canonical. Found
that in ArchivaDavResourceFactory (see snippet below).
ArchivaDavResourceFactory:605
---------------------------------------------------------------------------
LogicalResource logicalResource = new LogicalResource(path);
File resourceFile = new File(
managedRepositoryContent.getRepoRoot(), path);
if(!resourceFile.getCanonicalPath().equals(resourceFile.getAbsolutePath()))
{
throw new DavException( HttpServletResponse.SC_BAD_REQUEST );
}
---------------------------------------------------------------------------