Bug #4048
closedAPI mismatch between RGW and Swift
0%
Description
As discussed with Yehuda, when using RadosGW with a delimiter:
curl -H 'x-auth-token: 909e3793e499425fb90364738107da22' http://192.168.0.101/swift/v1/alex_container2?format=json\&limit=1001\&delimiter=/
[{"name":"mydir\/"}]
when using swift with delimiter:
curl -k -H 'x-auth-token: AUTH_tk9457e8b5ab714ffa89e3414deb9014c9' https://192.168.107.92:8080/v1/AUTH_system/test_container?format=json\&limit=1001\&delimiter=/
[{"subdir":"mydir/"}]
The key returned are different, Immediate impact is OpenStack dashboard throwing an exception when parsing a container with non-empty dir inside.
This also happens with XML output:
Swift:
<container name="test_container"><subdir name="mydir/"><name>mydir/</name></subdir></container>
RGW:
<container><object><name>mydir/</name></object></container>