You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jackrabbit.apache.org by "Rob Owen (JIRA)" <ji...@apache.org> on 2007/08/21 17:21:30 UTC
[jira] Created: (JCR-1071) PROPPATCH on collection gets 403
Forbidden
PROPPATCH on collection gets 403 Forbidden
------------------------------------------
Key: JCR-1071
URL: https://issues.apache.org/jira/browse/JCR-1071
Project: Jackrabbit
Issue Type: Bug
Components: webdav
Affects Versions: 1.4
Reporter: Rob Owen
Fix For: 1.4
DefaultHandler.canImport(PropertyImportContext, boolean) prevents setting properties (PROPPATCH) on collections through WebDAV ... returns 403 Forbidden. It checks to see whether the contextItem is not a collection, or has a jcr:content node. This test fails for a collection and should probably allow collections or nodes that have a jcr:content subnode. Here is a patch for the change
Index: jackrabbit-jcr-server/src/main/java/org/apache/jackrabbit/server/io/DefaultHandler.java
===================================================================
--- jackrabbit-jcr-server/src/main/java/org/apache/jackrabbit/server/io/DefaultHandler.java (revision 567695)
+++ jackrabbit-jcr-server/src/main/java/org/apache/jackrabbit/server/io/DefaultHandler.java (working copy)
@@ -570,7 +570,7 @@
}
Item contextItem = context.getImportRoot();
try {
- return contextItem != null && contextItem.isNode() && (!isCollection || ((Node)contextItem).hasNode(JcrConstants.JCR_CONTENT));
+ return contextItem != null && contextItem.isNode() && (isCollection || ((Node)contextItem).hasNode(JcrConstants.JCR_CONTENT));
} catch (RepositoryException e) {
log.error("Unexpected error: " + e.getMessage());
return false;
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (JCR-1071) PROPPATCH on collection gets 403
Forbidden
Posted by "angela (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/JCR-1071?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12524026 ]
angela commented on JCR-1071:
-----------------------------
the reason for denying importProperties for the DefaultHandler was, that its default nodetype (nt:folder) does not allow for any properties to be modified or removed.
however, i agree that the default handler should at least try to import properties, specially since the default node types can be changed.
> PROPPATCH on collection gets 403 Forbidden
> ------------------------------------------
>
> Key: JCR-1071
> URL: https://issues.apache.org/jira/browse/JCR-1071
> Project: Jackrabbit
> Issue Type: Bug
> Components: webdav
> Affects Versions: 1.4
> Reporter: Rob Owen
> Assignee: angela
> Fix For: 1.4
>
>
> DefaultHandler.canImport(PropertyImportContext, boolean) prevents setting properties (PROPPATCH) on collections through WebDAV ... returns 403 Forbidden. It checks to see whether the contextItem is not a collection, or has a jcr:content node. This test fails for a collection and should probably allow collections or nodes that have a jcr:content subnode. Here is a patch for the change
> Index: jackrabbit-jcr-server/src/main/java/org/apache/jackrabbit/server/io/DefaultHandler.java
> ===================================================================
> --- jackrabbit-jcr-server/src/main/java/org/apache/jackrabbit/server/io/DefaultHandler.java (revision 567695)
> +++ jackrabbit-jcr-server/src/main/java/org/apache/jackrabbit/server/io/DefaultHandler.java (working copy)
> @@ -570,7 +570,7 @@
> }
> Item contextItem = context.getImportRoot();
> try {
> - return contextItem != null && contextItem.isNode() && (!isCollection || ((Node)contextItem).hasNode(JcrConstants.JCR_CONTENT));
> + return contextItem != null && contextItem.isNode() && (isCollection || ((Node)contextItem).hasNode(JcrConstants.JCR_CONTENT));
> } catch (RepositoryException e) {
> log.error("Unexpected error: " + e.getMessage());
> return false;
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Assigned: (JCR-1071) PROPPATCH on collection gets 403
Forbidden
Posted by "angela (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/JCR-1071?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
angela reassigned JCR-1071:
---------------------------
Assignee: angela
> PROPPATCH on collection gets 403 Forbidden
> ------------------------------------------
>
> Key: JCR-1071
> URL: https://issues.apache.org/jira/browse/JCR-1071
> Project: Jackrabbit
> Issue Type: Bug
> Components: webdav
> Affects Versions: 1.4
> Reporter: Rob Owen
> Assignee: angela
> Fix For: 1.4
>
>
> DefaultHandler.canImport(PropertyImportContext, boolean) prevents setting properties (PROPPATCH) on collections through WebDAV ... returns 403 Forbidden. It checks to see whether the contextItem is not a collection, or has a jcr:content node. This test fails for a collection and should probably allow collections or nodes that have a jcr:content subnode. Here is a patch for the change
> Index: jackrabbit-jcr-server/src/main/java/org/apache/jackrabbit/server/io/DefaultHandler.java
> ===================================================================
> --- jackrabbit-jcr-server/src/main/java/org/apache/jackrabbit/server/io/DefaultHandler.java (revision 567695)
> +++ jackrabbit-jcr-server/src/main/java/org/apache/jackrabbit/server/io/DefaultHandler.java (working copy)
> @@ -570,7 +570,7 @@
> }
> Item contextItem = context.getImportRoot();
> try {
> - return contextItem != null && contextItem.isNode() && (!isCollection || ((Node)contextItem).hasNode(JcrConstants.JCR_CONTENT));
> + return contextItem != null && contextItem.isNode() && (isCollection || ((Node)contextItem).hasNode(JcrConstants.JCR_CONTENT));
> } catch (RepositoryException e) {
> log.error("Unexpected error: " + e.getMessage());
> return false;
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Resolved: (JCR-1071) PROPPATCH on collection gets 403
Forbidden
Posted by "angela (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/JCR-1071?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
angela resolved JCR-1071.
-------------------------
Resolution: Fixed
applied patch at rev. 571397
i let litmus run and there were no new issues found. note, that i didn't perform specific tests
for proppatch on collections.
> PROPPATCH on collection gets 403 Forbidden
> ------------------------------------------
>
> Key: JCR-1071
> URL: https://issues.apache.org/jira/browse/JCR-1071
> Project: Jackrabbit
> Issue Type: Bug
> Components: webdav
> Affects Versions: 1.4
> Reporter: Rob Owen
> Assignee: angela
> Fix For: 1.4
>
>
> DefaultHandler.canImport(PropertyImportContext, boolean) prevents setting properties (PROPPATCH) on collections through WebDAV ... returns 403 Forbidden. It checks to see whether the contextItem is not a collection, or has a jcr:content node. This test fails for a collection and should probably allow collections or nodes that have a jcr:content subnode. Here is a patch for the change
> Index: jackrabbit-jcr-server/src/main/java/org/apache/jackrabbit/server/io/DefaultHandler.java
> ===================================================================
> --- jackrabbit-jcr-server/src/main/java/org/apache/jackrabbit/server/io/DefaultHandler.java (revision 567695)
> +++ jackrabbit-jcr-server/src/main/java/org/apache/jackrabbit/server/io/DefaultHandler.java (working copy)
> @@ -570,7 +570,7 @@
> }
> Item contextItem = context.getImportRoot();
> try {
> - return contextItem != null && contextItem.isNode() && (!isCollection || ((Node)contextItem).hasNode(JcrConstants.JCR_CONTENT));
> + return contextItem != null && contextItem.isNode() && (isCollection || ((Node)contextItem).hasNode(JcrConstants.JCR_CONTENT));
> } catch (RepositoryException e) {
> log.error("Unexpected error: " + e.getMessage());
> return false;
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (JCR-1071) PROPPATCH on collection gets 403
Forbidden
Posted by "Jukka Zitting (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/JCR-1071?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jukka Zitting updated JCR-1071:
-------------------------------
Affects Version/s: (was: 1.4)
1.3
1.3.1
Fix Version/s: (was: 1.4)
1.3.2
Merged to the 1.3 branch in revision 577815.
> PROPPATCH on collection gets 403 Forbidden
> ------------------------------------------
>
> Key: JCR-1071
> URL: https://issues.apache.org/jira/browse/JCR-1071
> Project: Jackrabbit
> Issue Type: Bug
> Components: webdav
> Affects Versions: 1.3, 1.3.1
> Reporter: Rob Owen
> Assignee: angela
> Fix For: 1.3.2
>
>
> DefaultHandler.canImport(PropertyImportContext, boolean) prevents setting properties (PROPPATCH) on collections through WebDAV ... returns 403 Forbidden. It checks to see whether the contextItem is not a collection, or has a jcr:content node. This test fails for a collection and should probably allow collections or nodes that have a jcr:content subnode. Here is a patch for the change
> Index: jackrabbit-jcr-server/src/main/java/org/apache/jackrabbit/server/io/DefaultHandler.java
> ===================================================================
> --- jackrabbit-jcr-server/src/main/java/org/apache/jackrabbit/server/io/DefaultHandler.java (revision 567695)
> +++ jackrabbit-jcr-server/src/main/java/org/apache/jackrabbit/server/io/DefaultHandler.java (working copy)
> @@ -570,7 +570,7 @@
> }
> Item contextItem = context.getImportRoot();
> try {
> - return contextItem != null && contextItem.isNode() && (!isCollection || ((Node)contextItem).hasNode(JcrConstants.JCR_CONTENT));
> + return contextItem != null && contextItem.isNode() && (isCollection || ((Node)contextItem).hasNode(JcrConstants.JCR_CONTENT));
> } catch (RepositoryException e) {
> log.error("Unexpected error: " + e.getMessage());
> return false;
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.