You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jackrabbit.apache.org by "Julian Reschke (Jira)" <ji...@apache.org> on 2019/08/30 13:55:00 UTC

[jira] [Comment Edited] (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:comment-tabpanel&focusedCommentId=16918621#comment-16918621 ] 

Julian Reschke edited comment on JCR-4458 at 8/30/19 1:54 PM:
--------------------------------------------------------------

[~woon_san] - so the changes in {{jackrabbit-jcr2dav/src/test/java/org/apache/jackrabbit/jcr2dav/RepositoryStubImpl.java}} allow us to test a setup that we did not test before, and which will fail without the other changes, right?

In that case I'd like to split that into a separate issue, and get it into the code base right now.

WRT the actual change: I understand you ruled out changing/extending APIs in a way that would avoid the thread local?


was (Author: reschke):
[~woon_san] - so the changes in {{jackrabbit-jcr2dav/src/test/java/org/apache/jackrabbit/jcr2dav/RepositoryStubImpl.java}} allow us to testa setup that we did not test before, and which will fail without the other changes, right?

In that case I'd like to split that into a separate issue, and get it into the code base right now.

WRT the actual change: I understand you ruled out changing/extending APIs in a way that would avoid the thread local?

> 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
>            Assignee: Julian Reschke
>            Priority: Major
>             Fix For: 2.20
>
>         Attachments: JCR-4458.diff
>
>
> 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:
> {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 properly.



--
This message was sent by Atlassian Jira
(v8.3.2#803003)