Bug #7502
S3 API - deleting object always returns 204 regardless of object is existing or not
0%
Description
When using S3 API, deleting object always returns 204 regardless of object is existing or not. This is reproducible. It should return 404 when object is not existing.
DELETE /mybucket2/f1 HTTP/1.1
User-Agent: curl/7.19.7 (x86_64-redhat-linux-gnu) libcurl/7.19.7 NSS/3.14.3.0 zlib/1.2.3 libidn/1.18 libssh2/1.4.2
...
Date: Fri, 21 Feb 2014 08:41:55 +0000
Authorization: AWS X6WWDM4S9JBNVIZFAEGA:a3htJ5HsFbMuF6appi8f7K5PCCM=
< HTTP/1.1 204
< Date: Fri, 21 Feb 2014 08:41:57 GMT
< Server: Apache/2.2.15 (Red Hat)
< Content-Type: application/xml
History
#1 Updated by Ian Colle about 10 years ago
- Project changed from Ceph to rgw
#2 Updated by Neil Soman about 10 years ago
So I actually don't think this is a bug. AWS now returns 204 unconditionally. In fact, you get a 204 even if you attempt to delete an object that never existed (but if your perms say that you are allowed to delete it).
I owned the bucket "testytestlll" but never created the object "hiiiwe3r3"
DELETE /testytestlll/hiiiwe3r3 HTTP/1.1.
User-Agent: curl/7.19.7 (x86_64-redhat-linux-gnu) libcurl/7.19.7 NSS/3.14.0.0 zlib/1.2.3 libidn/1.18 libssh2/1.4.2.
Host: s3.amazonaws.com.
Accept: */*.
Date: Wed, 12 Mar 2014 20:19:21 +0000.
Authorization: AWS AKIAITXREUH2BL6GO6LA:JuOuBItWMGkrLYKJ8akPpQWYWmg=.
.
#
T 207.171.185.200:80 -> 192.168.1.16:51766 [AP]
HTTP/1.1 204 No Content.
x-amz-id-2: qio3MWROnsAYMD1Sbl16mMg2UfiXBv1ibQsjWYb4LsKr0NjyNYewHK9ZoLay2wOg.
x-amz-request-id: 12ED55ED73D89F9E.
Date: Wed, 12 Mar 2014 20:19:23 GMT.
Server: AmazonS3.
#3 Updated by Neil Soman about 10 years ago
Neil Soman wrote:
So I actually don't think this is a bug. AWS now returns 204 unconditionally. In fact, you get a 204 even if you attempt to delete an object that never existed (but if your perms say that you are allowed to delete it).
I owned the bucket "testytestlll" but never created the object "hiiiwe3r3"
DELETE /testytestlll/hiiiwe3r3 HTTP/1.1.
User-Agent: curl/7.19.7 (x86_64-redhat-linux-gnu) libcurl/7.19.7 NSS/3.14.0.0 zlib/1.2.3 libidn/1.18 libssh2/1.4.2.
Host: s3.amazonaws.com.
Accept: */*.
Date: Wed, 12 Mar 2014 20:19:21 +0000.
Authorization: AWS foo:bar.
.#
T 207.171.185.200:80 -> 192.168.1.16:51766 [AP]
HTTP/1.1 204 No Content.
x-amz-id-2: qio3MWROnsAYMD1Sbl16mMg2UfiXBv1ibQsjWYb4LsKr0NjyNYewHK9ZoLay2wOg.
x-amz-request-id: 12ED55ED73D89F9E.
Date: Wed, 12 Mar 2014 20:19:23 GMT.
Server: AmazonS3.
#4 Updated by Neil Soman about 10 years ago
Neil Soman wrote:
So I actually don't think this is a bug. AWS now returns 204 unconditionally. In fact, you get a 204 even if you attempt to delete an object that never existed (but if your perms say that you are allowed to delete it).
I owned the bucket "testytestlll" but never created the object "hiiiwe3r3"
#5 Updated by Yehuda Sadeh about 10 years ago
- Status changed from New to Rejected