how to remove x-versions-location header

asked 2012-09-20 06:41:52 -0500

simplidrive gravatar image

Hi,

We are trying to implement object versioning on our swift setup.

We apply the 'X-Versions-Location' header on a container with below command :

curl -i -XPUT -H "X-Auth-Token: AUTH_tkb97eb82ef37c433db3577a09c4f40cfe" -H "X-Versions-Location: versions" https://testswift.netmagicsolutions.com/v1/AUTH_cafdc147-9334-40ec-9e44-b4876e7a1ef2/mycontainer (https://testswift.netmagicsolutions.c...)

Now, if we want to disable the versioning for the container "mycontainer", we need to remove the 'X-Versions-Location'.

How do we remove the X-Versions-Location header from the container ?

Regards,

Viral

edit retag flag offensive close merge delete

2 answers

Sort by ยป oldest newest most voted
0

answered 2012-09-26 18:47:06 -0500

simplidrive gravatar image

I referred below URL which says "To turn off Object Versioning on your current version container, remove its X-Versions-Location metadata by sending an empty key value."

http://www.rackspace.com/blog/rackspace-cloud-files-how-to-use-object-versioning/ (http://www.rackspace.com/blog/rackspa...)

I tried running this command but the header still remains.

curl -XPOST -D - -H "X-Auth-Token: AUTH_tk19e1c8b8f2dd43229c166de916ad0c57" -H "X-Versions-Location: " https://swifttest.netmagicsolutions.com/v1/AUTH_cafdc147-9334-40ec-9e44-b4876e7a1ef2/container (https://swifttest.netmagicsolutions.c...)

Thanks,

Viral

edit flag offensive delete link more
0

answered 2012-09-26 20:15:54 -0500

simplidrive gravatar image

ok,

with the help of from John Dickinson the issue got resolved.

To disable the versioning on a container, we have to send empty headers.

In my case, the curl version I had (7.22.0) was not supporting sending of empty headers. Curl versions 7.23.0 and later support the same.

I simply upgraded the curl and libcurl packages to 7.27.0, and then gave below command which removed the header from the container.

curl -X POST -D - -H "X-Auth-Token: AUTH_tk19e1c8b8f2dd43229c166de916ad0c57" -H "X-Versions-Location;" https://testswift.netmagicsolutions.com/v1/AUTH_cafdc147-9334-40ec-9e44-b4876e7a1ef2/container (https://testswift.netmagicsolutions.c...)

Thanks John.

Regards,

Viral

edit flag offensive delete link more

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower

Stats

Asked: 2012-09-20 06:41:52 -0500

Seen: 47 times

Last updated: Sep 26 '12