Uploaded image for project: 'Jackrabbit Content Repository'
  1. Jackrabbit Content Repository
  2. JCR-4458

When JcrRemotingServlet deployed on non-root context, AclResource Webdav request fails

    XMLWordPrintableJSON

Details

    Description

      If org.apache.jackrabbit.server.remoting.davex.JcrRemotingServlet is configured in a non-root web application, the contextPath of which is "/cms" for example with the servletPath, "/server", then javax.jcr.Session#importXML(...) fails from a JCR client based on JCR/WebDAV. In other words, #importXML(...) fails from a JCR Session using a repository which can be created like the following for JCR over WebDAV:

          String repositoryAddress = "http://localhost:8080/cms/server";
          Jcr2davRepositoryFactory factory = new Jcr2davRepositoryFactory();
          Map<String, String> params = new HashMap<String, String>();
          params.put(JcrUtils.REPOSITORY_URI, repositoryAddress);
          Repository repository = factory.getRepository(params);
          // ...
      

      It seems like that Session#importXML(...) call invokes an AclResource Webdav request first on the specific resource path, but org.apache.jackrabbit.webdav.jcr.version.report.JcrPrivilegeReport#init(DavResource, ReportInfo) does not remove the contextPath, "/cms" for example, when determining the resoucrePath.

      Unlike the JcrPrivilegeReport, org.apache.jackrabbit.webdav.WebdavRequestImpl#getHrefLocator(String, boolean) seems to remove the contextPath properly.

      Attachments

        1. JCR-4458.diff
          38 kB
          Julian Reschke

        Issue Links

          Activity

            People

              reschke Julian Reschke
              woon_san Woonsan Ko
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: