RGW Swift API: support for 202 Accepted response code on container creation
Swift will return 202 Accepted if the container already exists. This behaviour is not covered by the OpenStack Object Storage API v1, so the issue is nothing more than a feature request.
On currently existing container /cont:
1. RGW via civetweb frontend:
$ curl -i http://localhost:8000/swift/v1/cont/ -X PUT -H "X-Auth-Token: $token"
HTTP/1.1 201 Created
Content-type: text/plain; charset=utf-8
Date: Wed, 18 Mar 2015 15:00:03 GMT
$ curl -i http://localhost:9090/v1/AUTH_test/cont/ -X PUT -H "X-Auth-Token: $token"
HTTP/1.1 202 Accepted
Content-Type: text/html; charset=UTF-8
Date: Wed, 18 Mar 2015 14:59:32 GMT
#2 Updated by Radoslaw Zarzynski over 8 years ago
- Status changed from New to In Progress
- Assignee set to Radoslaw Zarzynski
It looks like that all RGWCreateBucket_ObjStore_*::_send_response() methods are already prepared to handle the 202 Accepted. However, a little problem in RGWCreateBucket::execute() exists. Fixing.