You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jackrabbit.apache.org by "Woonsan Ko (JIRA)" <ji...@apache.org> on 2019/07/03 20:15:00 UTC
[jira] [Updated] (JCR-4458) When JcrRemotingServlet deployed on
non-root context, AclResource Webdav request fails
[ https://issues.apache.org/jira/browse/JCR-4458?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Woonsan Ko updated JCR-4458:
----------------------------
Description:
If {{org.apache.jackrabbit.server.remoting.davex.JcrRemotingServlet}} is configured as a servlet on servletPath, "/server", in a web application, the contextPath of which is "/cms" for example, then {{javax.jcr.Session#importXML(...)}} fails from a JCR client based on JCR/WebDAV. In other words, from a JCR Session from the repository like the following:
{code}
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);
// ...
{code}
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 property.
was:
If {{org.apache.jackrabbit.server.remoting.davex.JcrRemotingServlet}} is configured as a servlet on servletPath, "/server", in a web application, the contextPath of which is "/cms" for example, then {{javax.jcr.Session#importXML(...)}} fails from a JCR client based on JCR/WebDAV. In other words, from a JCR Session from the repository like the following:
{code}
String repositoryAddress = (args.length != 0) ? args[0] : "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);
// ...
{code}
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 property.
> When JcrRemotingServlet deployed on non-root context, AclResource Webdav request fails
> --------------------------------------------------------------------------------------
>
> Key: JCR-4458
> URL: https://issues.apache.org/jira/browse/JCR-4458
> Project: Jackrabbit Content Repository
> Issue Type: Bug
> Affects Versions: 2.18.2
> Reporter: Woonsan Ko
> Priority: Major
>
> If {{org.apache.jackrabbit.server.remoting.davex.JcrRemotingServlet}} is configured as a servlet on servletPath, "/server", in a web application, the contextPath of which is "/cms" for example, then {{javax.jcr.Session#importXML(...)}} fails from a JCR client based on JCR/WebDAV. In other words, from a JCR Session from the repository like the following:
> {code}
> 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);
> // ...
> {code}
> 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 property.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)