You are viewing a plain text version of this content. The canonical link for it is here.
Posted to oak-issues@jackrabbit.apache.org by "Davide Giannella (JIRA)" <ji...@apache.org> on 2014/01/30 17:16:15 UTC

[jira] [Created] (OAK-1375) Posting a json payload to the http-binding changes the root jcr:primaryType

Davide Giannella created OAK-1375:
-------------------------------------

             Summary: Posting a json payload to the http-binding changes the root jcr:primaryType
                 Key: OAK-1375
                 URL: https://issues.apache.org/jira/browse/OAK-1375
             Project: Jackrabbit Oak
          Issue Type: Bug
    Affects Versions: 0.16
            Reporter: Davide Giannella
            Priority: Minor


If you post with curl a json payload to oak (oak-run and httpbinding) the jcr:primaryType of root changes from rep:root to nt:unstructured.

*Step for reproducing*

* Fire oak with oak-run {{org.apache.jackrabbit.oak.run.Main}} and parameters: {{server /path/to/oak-repo}}
* check the rep:root is fine
{noformat}
curl -u admin:admin -H "Accept: application/json" http://localhost:8080
{"jcr:primaryType":"rep:root","jcr:system":{},"rep:security":{},"oak:index":{}}
{noformat}
* post a json payload for creating {{/content}}
{noformat}
curl -u admin:admin -H "Accept: application/json" -H "Content-Type: application/json" -X POST -d "{\"jcr:primaryType\":\"oak:unstructured\"}" http://localhost:8080/content
{noformat}
* check and see the "/" changing to nt:unstructured
{noformat}
curl -u admin:admin -H "Accept: application/json" http://localhost:8080
{"jcr:primaryType":"nt:unstructured","content":{},"jcr:system":{},"rep:security":{},"oak:index":{}}
{noformat}




--
This message was sent by Atlassian JIRA
(v6.1.5#6160)