Uploaded image for project: 'CouchDB'
  1. CouchDB
  2. COUCHDB-3362

DELETE attachment on non-existing document creates the document, rather than returning 404

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Won't Fix
    • 2.0.0, 1.6.1
    • None
    • None
    • None

    Description

      To reproduce:

      Create an emtpy database:
      curl -v -X PUT http://admin:abc123@localhost:6001/new

      Then try to delete an attachment from a (non-existant) document:
      curl -v -X DELETE http://admin:abc123@localhost:6001/new/foo/foo.txt

      The result is that the document "foo" is created:

      {"ok":true,"id":"foo","rev":"1-967a00dff5e02add41819138abb3284d"}

      Expected:

      404 error, as per the docs: http://docs.couchdb.org/en/2.0.0/api/document/attachments.html#delete--db-docid-attname

      Observed in both CouchDB 1.6.1 and 2.0.0

      Attachments

        Activity

          People

            Unassigned Unassigned
            flimzy Jonathan Hall
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: