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

Import does not properly handle replace import

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • Servlets Post 2.1.0
    • Servlets Post 2.1.2
    • Servlets
    • None

    Description

      Importing (system view) content has several flaws:

      (1) if :name request parameter is given and a node exists of that name the request fails with a RepositoryException. Rather the request should either replace the existing node (if the :replace request parameter is true) or terminate the request with a 412/PRECONDITION FAILED otherwise

      (2) If the import operation replaces an existing node, the request is actually not a creation request but a modification request. The response status should thus (in case of success) be 200/OK and not 201/CREATED.

      Attachments

        Activity

          People

            fmeschbe Felix Meschberger
            fmeschbe Felix Meschberger
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: