incubator-couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From wolfgang haefelinger <whaefelin...@gmail.com>
Subject Re: delete Docs
Date Wed, 07 Apr 2010 10:55:14 GMT
On Wed, Apr 7, 2010 at 12:25 PM, Jan Lehnardt <jan@apache.org> wrote:

>> of the resource in order to delete it. After all, the
>> following appears to work fine (still using version 0.10 ):
>>
>> $ curl -X DELETE http://localhost:5984/mydb/myid?rev=whatever
>
> You are saying are are able to delete a document by passing in a rev that doesn't match
the rev in the document? Can you create a reproducing test case for that?

No, I'm not saying this. Where do you read that?

I'm stating that there is something fishy with "couchdb-python". As an
example, I taking this line of code

self.resource.delete_json(id, rev=headers['etag'].strip('"'))

and I wonder about "delete_json()" - which does not make sense. I
would expect  something like

self.resource.delete(id, rev=headers['etag'].strip('"'))

because a document's representation does not matter when deleting it.
The original code is equivalent with

 $ curl -H "content-type: application/json" -X DELETE  ${url}

Providing that mime-type is unnecessary however, cause this works fine:

$ curl -X DELETE  ${url}

Mime
View raw message