[
https://issues.apache.org/jira/browse/SLING-7651?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16463673#comment-16463673
]
Bertrand Delacretaz commented on SLING-7651:
--------------------------------------------
It looks like the root cause is that in trunk the root resource is resolved to
a {{SyntheticResource}}, while in sling10 that's a {{JcrNodeResource}}. The
POST servlet code, when getting a synthetic resource, correctly decides that it
needs to create a concrete resource, hence this changed behavior.
I thought this might have to do with recent changes to default access control
on the root, but adding the below privileges on / doesn't help:
{code}
"everyone":{
"principal":"everyone",
"granted":[
"jcr:all"
],
"order":6
}
{code}
I'll ask for hints on our dev list before digging too deep.
> POST to / creates nodes instead of setting properties
> -----------------------------------------------------
>
> Key: SLING-7651
> URL: https://issues.apache.org/jira/browse/SLING-7651
> Project: Sling
> Issue Type: Bug
> Components: Servlets
> Affects Versions: Servlets Post 2.3.24
> Reporter: Bertrand Delacretaz
> Assignee: Bertrand Delacretaz
> Priority: Major
>
> The changes that I had to make to {{PostToRootTest}} [1] indicate that the
> POST behavior has changed since sling10, at least on /.
> With sling10 this request sets a property {{x=y }}on the root node, while
> with the current trunk it creates a node under the root.
> {code:java}
> curl -u admin:admin -Fx=y http://localhost:8080/
> {code}
> It looks like the culprit is {{resource}} being null in
> {{AbstractCreateOperation.processCreate}}, in this code:
> {code:java}
> final String path = response.getPath();
> final Resource resource = resolver.getResource(path);
> {code}
> I'll investigate further - and the changes to {{PostToRootTest}} should be
> reverted once this is fixed.
> [1]
> [https://github.com/apache/sling-org-apache-sling-launchpad-integration-tests/commit/3750eb05dc038544ba155d91de8991114077ac0c]
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)