Uploaded image for project: 'Service Packs and Hot Fixes'
  1. Service Packs and Hot Fixes
  2. MNT-17272

AOS not sending a 412 response in the case of CONFLICT

    Details

      Description

      How to reproduce?
      ===================

      1) create a 5.1.1 alfresco (linux, pg, tomcat) with AOS 1.1.3
      2) as 'admin' in Share create a site 'site1', with two folders 'folder1' and 'folder2'
      3) in each folder upload the same file 'test1.txt'
      4) confirm that doing a MOVE to overwrite test1.txt in folder2 with the test1.txt is folder1 fails over webdav with a 412 error

      curl -v \
      --user admin:admin \
      -X MOVE \
      -H "Overwrite: F" \
      -H "Destination: http://10.69.69.1:8080/alfresco/webdav/Sites/site1/documentLibrary/folder2/test1.txt" \
      http://10.69.69.1:8080/alfresco/webdav/Sites/site1/documentLibrary/folder1/test1.txt
      
      < HTTP/1.1 412 Precondition Failed
      

      5) try to do the same move but over AOS

      curl -v \
      --user admin:admin \
      -X MOVE \
      -H "Overwrite: F" \
      -H "Destination: http://10.69.69.1:8080/alfresco/aos/Sites/site1/documentLibrary/folder2/test1.txt" \
      http://10.69.69.1:8080/alfresco/aos/Sites/site1/documentLibrary/folder1/test1.txt
      

      Result
      ========
      The move still fails but with a different error code:

      < HTTP/1.1 409 Conflict
      

      Expected result
      =================
      Just like in the webdav case, the AOS server should return a "412 Precondition Failed" error.

      Notes
      ========
      1) The "412 Precondition Failed" error is handled well by the webdav "mini redir" client of Windows (see attached trace for windows 7 dump_webdav.pcap).
      In that case, the client shows to the user a nice menu asking what he wants to do with the move, see screen shot webdav.png)

      On the other hand the webdav client is completely confused when getting the 409 error, see trace dump_aos.pcap recorded with a windows 7 client and the attached screen shot aos.png.

      2) it seems that this is really a server-side issue and not just an issue with the error management client-side:
      indeed if we look at the RFC http://www.webdav.org/specs/rfc4918.html
      section 9.9.4 MOVE / Status Codes
      http://www.webdav.org/specs/rfc4918.html#rfc.section.9.9.4

      412 (Precondition Failed) - A condition header failed. Specific to MOVE, this could mean that the Overwrite header is "F" and the destination URL is already mapped to a resource.
      

      I thus log this Jira as a "bug".

        Attachments

        1. aos.png
          aos.png
          393 kB
        2. dump_aos.pcap
          62 kB
        3. dump_webdav.pcap
          45 kB
        4. webdav.png
          webdav.png
          480 kB

          Activity

            People

            • Assignee:
              closedbugs Closed Bugs
              Reporter:
              amadon Alex Madon [X] (Inactive)
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 2 days, 6 hours, 30 minutes
                2d 6h 30m