Import does not properly handle replace import
----------------------------------------------
Key: SLING-2035
URL: https://issues.apache.org/jira/browse/SLING-2035
Project: Sling
Issue Type: Bug
Components: Servlets
Affects Versions: Servlets Post 2.1.0
Reporter: Felix Meschberger
Assignee: Felix Meschberger
Fix For: Servlets Post 2.1.2
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.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira