Bug #11088
RGW Swift API: wrong handling of empty metadata on Swift container
0%
Description
Ceph RADOS Gateway allows to set empty container metadata items if they are currently not present.
$ curl -i http://localhost:8080/swift/v1/cont -X POST -H "X-Auth-Token: $token" -H "X-Container-Meta-Test;"
HTTP/1.1 204 No Content
Server: nginx/1.4.6 (Ubuntu)
Date: Tue, 10 Mar 2015 17:52:31 GMT
Content-Type: text/plain; charset=utf-8
Connection: keep-alive
$ curl -i http://localhost:8080/swift/v1/cont -X HEAD -H "X-Auth-Token: $token"
HTTP/1.1 204 No Content
Server: nginx/1.4.6 (Ubuntu)
Date: Tue, 10 Mar 2015 17:52:39 GMT
Content-Type: text/plain; charset=utf-8
Connection: keep-alive
X-Container-Object-Count: 3
X-Container-Bytes-Used: 0
X-Container-Bytes-Used-Actual: 0
X-Storage-Policy: default-placement
X-Container-Meta-test:
Swift filters out such items:
$ curl -i http://localhost:9090/v1/AUTH_test/cont -X POST -H "X-Auth-Token: $token" -H "X-Container-Meta-Test;"
HTTP/1.1 204 No Content
Content-Length: 0
Content-Type: text/html; charset=UTF-8
X-Trans-Id: txe2a69d98c60f45889bd84-0054ff2f14
Date: Tue, 10 Mar 2015 17:51:16 GMT
$ curl -i http://localhost:9090/v1/AUTH_test/cont -X HEAD -H "X-Auth-Token: $token"
HTTP/1.1 204 No Content
Content-Length: 0
X-Container-Object-Count: 2
Accept-Ranges: bytes
X-Timestamp: 1424789735.12920
X-Container-Bytes-Used: 0
Content-Type: text/plain; charset=utf-8
X-Trans-Id: tx32a97f9099984fc58d827-0054ff2f1b
Date: Tue, 10 Mar 2015 17:51:23 GMT
Associated revisions
rgw: fix handling empty metadata items on Swift container.
Fixes: #11088
Backport: hammer
Signed-off-by: Radoslaw Zarzynski <rzarzynski@mirantis.com>
rgw: fix handling empty metadata items on Swift container.
Fixes: #11088
Backport: hammer
Signed-off-by: Radoslaw Zarzynski <rzarzynski@mirantis.com>
(cherry picked from commit 1660d8625212f7b5fb30568ed640f467297e36cb)
History
#1 Updated by Radoslaw Zarzynski over 8 years ago
I'm working on that.
#2 Updated by Radoslaw Zarzynski over 8 years ago
Pull request: https://github.com/ceph/ceph/pull/3925.
#3 Updated by Radoslaw Zarzynski over 8 years ago
- Status changed from New to Fix Under Review
- Assignee set to Radoslaw Zarzynski
#4 Updated by Yehuda Sadeh over 8 years ago
- Status changed from Fix Under Review to Pending Backport
- Backport set to hammer
Merged in, commit:e35269e74966c8d8c3fdfa02e286142bc4d35545
#5 Updated by Loïc Dachary over 8 years ago
- hammer backport https://github.com/ceph/ceph/pull/4580
#6 Updated by Loïc Dachary over 8 years ago
- Status changed from Pending Backport to Resolved
- Regression set to No