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

Post servlet's delete operation deletes parent of nonexisting node

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • Servlets Post 2.3.2
    • Servlets Post 2.3.4
    • Servlets
    • None

    Description

      In the below scenario, /tmp/test is gone after the delete operation - the resource resolver goes up the path of the nonexisting node, and it's /tmp/test that's provided to the DeleteOperation.

      I think we should change this (maybe with a backwards compatibility switch), as it's clear that the user's intention in this case is not to delete /tmp/test. Maybe just reject :delete operations if the request has any selector or extensions.

      curl -u admin:admin -X POST http://localhost:8080/tmp/test/some.node
      curl -u admin:admin http://localhost:8080/tmp/test.tidy.2.json # looks good
      curl -u admin:admin -F:operation=delete http://localhost:8080/tmp/test.other/nothing
      curl -u admin:admin http://localhost:8080/tmp/test.tidy.2.json # 404

      Attachments

        1. SLING-3203.patch
          2 kB
          Bertrand Delacretaz

        Activity

          People

            bdelacretaz Bertrand Delacretaz
            bdelacretaz Bertrand Delacretaz
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: