Comment 4 for bug 1031150

Revision history for this message
Ke Wu (ke-wu) wrote :

I noticed that when you create new pseudo folder, you have a "/" after the folder's name, I tried without the slash and got following result, as you can see without the slash the pseudo folder get overwritten. Does this mean the pseudo folder's name must be followed by a "/" ?

create a new container:

curl -XPUT http://10.211.55.102:8080/v1/AUTH_test/test -Hx-auth-token:d94abbc396094eeaa02da16cdbab5fbb

add new pseudo folder
curl -XPUT http://10.211.55.102:8080/v1/AUTH_test/test/psuedo-1 -Hcontent-type:application/directory -Hcontent-length:0 -Hx-auth-token:d94abbc396094eeaa02da16cdbab5fbb

list objects:
curl http://10.211.55.102:8080/v1/AUTH_test/test?format=json -Hx-auth-token:d94abbc396094eeaa02da16cdbab5fbb | python -mjson.tool

    {
        "bytes": 0,
        "content_type": "application/directory",
        "hash": "d41d8cd98f00b204e9800998ecf8427e",
        "last_modified": "2012-08-01T18:11:04.739910",
        "name": "psuedo-1"
    }

add a file with the same name as the pseudo folder:
curl -XPUT http://10.211.55.102:8080/v1/AUTH_test/test/psuedo-1 -Hcontent-type:text/plain --data-binary '1234' -Hx-auth-token:d94abbc396094eeaa02da16cdbab5fbb

list the objects:
curl http://10.211.55.102:8080/v1/AUTH_test/test?format=json -Hx-auth-token:d94abbc396094eeaa02da16cdbab5fbb | python -mjson.tool
    {
        "bytes": 4,
        "content_type": "text/plain",
        "hash": "81dc9bdb52d04dc20036dbd8313ed055",
        "last_modified": "2012-08-01T18:13:45.011280",
        "name": "psuedo-1"
    }