Uploaded image for project: 'Jackrabbit Oak'
  1. Jackrabbit Oak
  2. OAK-1375

Posting a json payload to the http-binding changes the root jcr:primaryType

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • 0.16
    • None
    • remoting
    • None

    Description

      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
        curl -u admin:admin -H "Accept: application/json" http://localhost:8080
        {"jcr:primaryType":"rep:root","jcr:system":{},"rep:security":{},"oak:index":{}}
        
      • post a json payload for creating /content
        curl -u admin:admin -H "Accept: application/json" -H "Content-Type: application/json" -X POST -d "{\"jcr:primaryType\":\"oak:unstructured\"}" http://localhost:8080/content
        
      • check and see the "/" changing to nt:unstructured
        curl -u admin:admin -H "Accept: application/json" http://localhost:8080
        {"jcr:primaryType":"nt:unstructured","content":{},"jcr:system":{},"rep:security":{},"oak:index":{}}
        

      Attachments

        Activity

          People

            Unassigned Unassigned
            edivad Davide Giannella
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: