Uploaded image for project: 'Sling'
  1. Sling
  2. SLING-7651

POST to / creates nodes instead of setting properties

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: Servlets Post 2.3.24
    • Fix Version/s: None
    • Component/s: Servlets
    • Labels:
      None

      Description

      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.

       curl -u admin:admin -Fx=y http://localhost:8080/
      

      It looks like the culprit is resource being null in AbstractCreateOperation.processCreate, in this code:

      final String path = response.getPath();
      final Resource resource = resolver.getResource(path);
      

      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

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                bdelacretaz Bertrand Delacretaz
                Reporter:
                bdelacretaz Bertrand Delacretaz
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: