You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@couchdb.apache.org by GitBox <gi...@apache.org> on 2019/08/27 13:04:03 UTC
[GitHub] [couchdb] sztanyoo opened a new issue #2146: Deleting not existing
attachment responds 200 instead of 404
sztanyoo opened a new issue #2146: Deleting not existing attachment responds 200 instead of 404
URL: https://github.com/apache/couchdb/issues/2146
## Description
DELETE for a not existing attachment responds with 200 OK even if the attachment is missing.
Seems to be a legacy issue: https://issues.apache.org/jira/browse/COUCHDB-1594
## Steps to Reproduce
```
curl -X PUT http://xxx:yyy@localhost:5984/database/25 -d '{"name": "whatever"}'
{"ok":true,"id":"25","rev":"1-a0f595984a7c4cf1dafc4cf4c04081d6"}
curl -v -X DELETE http://bence:bence@localhost:5984/database/25/notexisting.txt?rev=1-a0f595984a7c4cf1dafc4cf4c04081d6
* Trying ::1...
* TCP_NODELAY set
* Connected to localhost (::1) port 5984 (#0)
* Server auth using Basic with user 'bence'
> DELETE /database/25/notexisting.txt?rev=1-a0f595984a7c4cf1dafc4cf4c04081d6 HTTP/1.1
> Host: localhost:5984
> Authorization: Basic YmVuY2U6YmVuY2U=
> User-Agent: curl/7.54.0
> Accept: */*
>
< HTTP/1.1 200 OK
< Cache-Control: must-revalidate
< Content-Length: 65
< Content-Type: application/json
< Date: Tue, 27 Aug 2019 13:00:13 GMT
< Server: CouchDB/2.3.1 (Erlang OTP/19)
< X-Couch-Request-ID: 55fc18dc9d
< X-CouchDB-Body-Time: 0
<
{"ok":true,"id":"25","rev":"2-78d70995b77dec16c8e05b069de77a5d"}
````
## Expected Behaviour
According to https://docs.couchdb.org/en/stable/api/document/attachments.html#delete--db-docid-attname it should respond with status code 404.
## Your Environment
{"couchdb":"Welcome","version":"2.3.1","git_sha":"c298091a4","uuid":"8f9306c0bae0dddec670160224ec140e","features":["pluggable-storage-engines","scheduler"],"vendor":{"name":"The Apache Software Foundation"}}
* CouchDB Version used: 2.3.1
* Browser name and version: curl 7.54.0 (x86_64-apple-darwin18.0) libcurl/7.54.0 LibreSSL/2.6.5 zlib/1.2.11 nghttp2/1.24.1
* Operating System and version: mac OS Mojave 10.14.6
## Additional context
[TIP]: # ( Add any other context about the prbolem here. )
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services