Uploaded image for project: 'Chemistry (Retired)'
  1. Chemistry (Retired)
  2. CMIS-1045

Successful deletion of folder (204 NO CONTENT) returns FailedToDeleteData

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Invalid
    • DotCMIS 0.7
    • None
    • dotcmis
    • None
    • Alfresco 5.2.0

    Description

      The CMIS 1.1 specification (chapter 3.11.4.3):

      3.11.4.3 HTTP DELETE
      This removes the folder from the repository. This is deletion of the folder only and not any contained objects.
      CMIS Services:
          deleteObject 
      Success Status Codes:
          204 No Content
      

      After successfully deleting the folder, Alfresco correctly sends HTTP status 204 NO CONTENT.

      Problematic source code: https://github.com/apache/chemistry-dotcmis/blob/trunk/DotCMIS/binding/atompub/atompub.cs#L2053

      // check response code
      if (resp.StatusCode == HttpStatusCode.OK || resp.StatusCode == HttpStatusCode.Accepted || resp.StatusCode == HttpStatusCode.NoContent)
      {
          return new FailedToDeleteData();
      }
      

      It should be something like this:

      if (resp.StatusCode != HttpStatusCode.NoContent)

      ... and the throw ConvertToCmisException(resp); at the end of the method needs to be modified too.

      I have only observed this for folders, I have not checked all but other entities seems to have been written correctly.
      Cheers!

      Attachments

        Activity

          People

            Unassigned Unassigned
            nicolas raoul Nicolas Raoul
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: